register_particles¶
- mdhelper.openmm.system.register_particles(system: System, topology: Topology, N: int = 0, mass: float | Quantity = 0.0, *, chain: Chain = None, element: Element = None, name: str = '', resname: str = '', nbforce: NonbondedForce = None, charge: float | Quantity = 0.0, sigma: float | Quantity = 0.0, epsilon: float | Quantity = 0.0, cnbforces: dict[CustomNonbondedForce, tuple[Any]] = None) None [source]¶
Sequentially register particles of the same type to the simulation system, topology, and nonbonded pair potentials.
- Parameters:
- systemopenmm.System
OpenMM molecular system. Can be
None
if particles are to be registered to the topology only.- topologyopenmm.app.Topology
Topological information about an OpenMM system.
- Nint, default:
0
Number of atom(s). If not specified, no particles are added.
- massfloat or openmm.unit.Quantity, default:
0
Molar mass. If not specified, particles are massless and will not move.
Reference unit: \(\mathrm{g/mol}\).
- chainopenmm.app.Chain, keyword-only, optional
Chain that the atom(s) should be added to. If not provided, a new chain is created for each atom.
- elementopenmm.app.Element, keyword-only, optional
Chemical element of the atom(s) to add.
- namestr, keyword-only, optional
Name of the atom(s) to add.
- resnamestr, keyword-only, optional
Name of the residue(s) to add. If not specified, name is used if available.
- nbforceopenmm.NonbondedForce, keyword-only, optional
Standard OpenMM pair potential object implementing the nonbonded Lennard-Jones and Coulomb potentials.
- chargefloat or openmm.unit.Quantity, keyword-only, default: :code`0`
Charge \(q\) of the atom(s) for use in the Coulomb potential in nbforce.
Reference unit: \(\mathrm{e}\).
- sigmafloat or openmm.unit.Quantity, keyword-only, default: :code`0`
\(\sigma\) parameter of the Lennard-Jones potential in nbforce.
Reference unit: \(\mathrm{nm}\).
- epsilonfloat or openmm.unit.Quantity, keyword-only, default: :code`0`
\(\epsilon\) parameter of the Lennard-Jones potential in nbforce.
Reference unit: \(\mathrm{kJ/mol}\).
- cnbforcesdict, keyword-only, optional
Custom pair potential objects implementing other non-standard pair potentials and their corresponding per-particle parameters.
Example:
{gauss: (0.3 * unit.nanometer,)}
, where gauss is a custom Gaussian potential obtained usingmdhelper.openmm.pair.gauss()
.