cgexplore.forcefields.ForceField¶
- class cgexplore.forcefields.ForceField(identifier, prefix, present_beads, bond_targets, angle_targets, torsion_targets, nonbonded_targets, vdw_bond_cutoff, verbose=True)[source]¶
Bases:
objectDefine a CG ForceField.
- Parameters:
identifier (str) – String idenifier of the forcefield.
prefix (str) – Prefix for the forcefield for file saving.
present_beads (Sequence[CgBead]) – The CgBeads that are present in the model.
bond_targets (Sequence[TargetBond | TargetMartiniBond]) – Target bond classes to find and assign. See systems_optimisation.utilities for an example.
angle_targets (Sequence[TargetAngle | TargetCosineAngle | TargetMartiniAngle]) – Target angle classes to find and assign. See systems_optimisation.utilities for an example.
torsion_targets (Sequence[TargetTorsion | TargetMartiniTorsion]) – Target torsion classes to find and assign. See systems_optimisation.utilities for an example.
nonbonded_targets (Sequence[TargetNonbonded]) – Target nonbonded term classes to find and assign. See systems_optimisation.utilities for an example.
vdw_bond_cutoff (int) – How many bonds between excluded beads from nonbonded terms.
verbose (bool) – True if cgexplore should inform the user about what it assigns.
Methods
Assign forcefield terms to molecule.
Check if there are missing terms in forcefield.
Get beads in forcefield.
Get the underlying forcefield dict.
Get human-readable file name.
Get forcefield identifier.
Get forcefield prefix.
Get beads present.
Get targets of forcefield.
Get vdW bond cutoff of forcefield.
Write forcefield definition to human-readable file.
- assign_terms(molecule, name, output_dir)[source]¶
Assign forcefield terms to molecule.
- Parameters:
- Return type:
- get_all_possible_terms(molecule)[source]¶
Check if there are missing terms in forcefield.
- Parameters:
molecule (Molecule)
- Return type:
None