Module dcg_sci_tool.structures_analysis.split_atoms_by_CO_midplane

Functions

def split_atoms_by_CO_midplane(data, c_index: int, o_index: int, atom_indices: List[int]) ‑> Tuple[List[int], List[int]]

将给定原子索引列表中的原子,根据目标C和O原子连线的中垂面划分为两侧。 返回位于C原子一侧的原子索引列表和O原子一侧的原子索引列表。

Args

data
包含原子结构信息的对象(如OVITO DataCollection), 或可以直接获取原子坐标的数组/结构对象。
c_index
目标C原子的索引。
o_index
目标O原子的索引。
atom_indices
要划分的原子索引列表。

Returns

tuple
包含两个列表的元组: - c_side_indices: 位于C原子一侧的原子索引列表。 - o_side_indices: 位于O原子一侧的原子索引列表。

Raises

ValueError
如果输入参数无效或无法获取原子坐标。