sponge.core.SimulationCell

View Source On Gitee
class sponge.core.SimulationCell(system: Molecule, potential: PotentialCell, bias: Bias = None, cutoff: float = None, neighbour_list: NeighbourList = None, wrapper: EnergyWrapper = None)[source]

Cell for simulation, equivalent to sponge.core.WithEnergyCell.

Note

This Cell will be removed a future release. Please use sponge.core.WithEnergyCell instead.

Parameters
  • system (sponge.system.Molecule) – Simulation system.

  • potential (sponge.potential.PotentialCell) – Potential energy function cell.

  • bias (sponge.potential.Bias, optional) – Bias potential function cell. Default: None.

  • cutoff (float, optional) – Cut-off distance for neighbour list. If None is given, it will be assigned as the cutoff value of the of potential energy. Default: None.

  • neighbour_list (sponge.partition.NeighbourList, optional) – Neighbour list. Default: None.

  • wrapper (sponge.sampling.wrapper.EnergyWrapper, optional) – Network to wrap and process potential and bias. Default: None.

Supported Platforms:

Ascend GPU

Examples

>>> # You can find case2.pdb file under MindSPONGE/tutorials/basic/case2.pdb
>>> from sponge import Protein
>>> from sponge.potential.forcefield import ForceField
>>> from sponge.partition import NeighbourList
>>> from sponge.core.simulation import SimulationCell
>>> system = Protein(pdb='case2.pdb', rebuild_hydrogen=True)
>>> potential = ForceField(system, 'AMBER.FF99SB')
>>> neighbour_list = NeighbourList(system, cutoff=None, cast_fp16=True)
>>> simulation_cell = SimulationCell(
...     system=system,
...     potential=potential,
...     neighbour_list=neighbour_list,
... )