sponge.core.AnalysisCell
- class sponge.core.AnalysisCell(system: Molecule, potential: PotentialCell, neighbour_list: NeighbourList = None)[源代码]
用于分析的模块。
- 参数:
system (
sponge.system.Molecule
) - 模拟系统。potential (
sponge.potential.PotentialCell
) - 势能。neighbour_list (
sponge.partition.NeighbourList
, 可选) - 邻居列表。默认:None
。
- 输入:
coordinate (Tensor) - 坐标。shape为
。数据类型为 float。这里的 是batch size, 是原子数量,而 是模拟系统的空间维度,通常为3。pbc_box (Tensor) - PBC边界条件。shape为
。数据类型为 float。energy (Tensor) - 能量。shape为
。数据类型为 float。force (Tensor) - 原子力。shape为
。数据类型为 float。potentials (Tensor, 可选) - 力场来源的原始势能。shape为
。这里的 是势能的数量。数据类型为 float。默认:0
。total_bias (Tensor, 可选) - 用于重加权的总偏置势。shape为
。数据类型为 float。默认:0
。biases (Tensor, 可选) - 初始偏置势。shape为
。这里的 是偏置势的数量。数据类型为 float。默认:0
。
- 输出:
coordinate (Tensor) - 坐标。shape为
。数据类型为 float。pbc_box (Tensor) - PBC边界条件。shape为
。数据类型为 float。energy (Tensor) - 模拟系统的总势能。shape为
。数据类型为 float。force (Tensor) - 模拟系统中每个原子的力。shape为
。数据类型为 float。potentials (Tensor) - 来自力场的势能。shape为
。数据类型为 float。total_bias (Tensor) - 用于重加权的总偏置势。shape为
。数据类型为 float。biases (Tensor) - 偏置势。shape为
。数据类型为 float。
- 支持平台:
Ascend
GPU
样例:
>>> from sponge.system import Molecule >>> from sponge.potential.forcefield import ForceField >>> from sponge.core.sponge import Sponge >>> from sponge.core.analysis import AnalysisCell >>> system = Molecule(template='water.tip3p.yaml') >>> potential = ForceField(system, parameters='SPCE') >>> analysis = AnalysisCell(system, potential)