ordering.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:atomorder 作者: larsbratholm 项目源码 文件源码
def get_element_type_subset_indices(self):
        """
        It is currently required that the element of two matching atoms is the same.
        This constructs indices to e.g. the carbon-carbon submatrix.

        """
        # TODO: this is redundant if the elements does not have to match
        unique_elements = np.unique(self.reactants_elements)
        subset_indices = np.empty(unique_elements.size, dtype=object)
        for i, element in enumerate(unique_elements):
            rows = np.where(self.reactants_elements == element)[0]
            cols = np.where(self.products_elements == element)[0]
            subset_indices[i] = np.ix_(rows,cols)

        return subset_indices
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号