ForceBalance API  1.3
Automated optimization of force fields and empirical potentials
List of all members | Public Member Functions | Public Attributes
src.smirnoffio.SMIRNOFF Class Reference

Derived from Engine object for carrying out OpenMM calculations that use the SMIRNOFF force field. More...

Inheritance diagram for src.smirnoffio.SMIRNOFF:
[legend]
Collaboration diagram for src.smirnoffio.SMIRNOFF:
[legend]

Public Member Functions

def __init__ (self, name="openmm", kwargs)
 
def readsrc (self, kwargs)
 SMIRNOFF simulations always require the following passed in via kwargs: More...
 
def prepare (self, pbc=False, mmopts={}, kwargs)
 Prepare the calculation. More...
 
def update_simulation (self, kwargs)
 Create the simulation object, or update the force field parameters in the existing simulation object. More...
 
def optimize (self, shot=0, align=True, crit=1e-4)
 
def interaction_energy (self, fraga, fragb)
 Calculate the interaction energy for two fragments. More...
 
def get_smirks_counter (self)
 Get a counter for the time of appreance of each SMIRKS. More...
 

Public Attributes

 valkwd
 
 mol
 
 mol2
 
 abspdb
 
 ref_mol
 
 pdb
 
 offxml
 
 forcefield
 
 off_topology
 Load mol2 files for smirnoff topology. More...
 
 mod
 
 mmopts
 OpenMM options for setting up the System. More...
 
 restrain_k
 Specify frozen atoms and restraint force constant. More...
 
 freeze_atoms
 
 pbc
 Set system options from ForceBalance force field options. More...
 
 xyz_omms
 print warning for 'nonbonded_cutoff' keywords More...
 
 AtomLists
 Build a topology and atom lists. More...
 
 AtomMask
 
 realAtomIdxs
 
 simkwargs
 
 system
 
 nbcharges
 
 name
 
 A
 
 B
 

Detailed Description

Derived from Engine object for carrying out OpenMM calculations that use the SMIRNOFF force field.

Definition at line 192 of file smirnoffio.py.

Constructor & Destructor Documentation

◆ __init__()

def src.smirnoffio.SMIRNOFF.__init__ (   self,
  name = "openmm",
  kwargs 
)

Definition at line 195 of file smirnoffio.py.

Member Function Documentation

◆ get_smirks_counter()

def src.smirnoffio.SMIRNOFF.get_smirks_counter (   self)

Get a counter for the time of appreance of each SMIRKS.

Definition at line 436 of file smirnoffio.py.

Here is the call graph for this function:

◆ interaction_energy()

def src.smirnoffio.SMIRNOFF.interaction_energy (   self,
  fraga,
  fragb 
)

Calculate the interaction energy for two fragments.

Because this creates two new objects and requires passing in the mol2 argument, the codes are copied and modified from the OpenMM class.

Definition at line 404 of file smirnoffio.py.

Here is the call graph for this function:

◆ optimize()

def src.smirnoffio.SMIRNOFF.optimize (   self,
  shot = 0,
  align = True,
  crit = 1e-4 
)

Definition at line 395 of file smirnoffio.py.

◆ prepare()

def src.smirnoffio.SMIRNOFF.prepare (   self,
  pbc = False,
  mmopts = {},
  kwargs 
)

Prepare the calculation.

Note that we don't create the Simulation object yet, because that may depend on MD integrator parameters, thermostat, barostat etc.

This is mostly copied and modified from openmmio.py's OpenMM.prepare(), but we are calling ForceField() from the OpenFF toolkit and ignoring AMOEBA stuff.

Definition at line 270 of file smirnoffio.py.

◆ readsrc()

def src.smirnoffio.SMIRNOFF.readsrc (   self,
  kwargs 
)

SMIRNOFF simulations always require the following passed in via kwargs:

Parameters

pdb : string Name of a .pdb file containing the topology of the system mol2 : list A list of .mol2 file names containing the molecule/residue templates of the system

Also provide 1 of the following, containing the coordinates to be used: mol : Molecule forcebalance.Molecule object coords : string Name of a file (readable by forcebalance.Molecule) This could be the same as the pdb argument from above.

Definition at line 217 of file smirnoffio.py.

◆ update_simulation()

def src.smirnoffio.SMIRNOFF.update_simulation (   self,
  kwargs 
)

Create the simulation object, or update the force field parameters in the existing simulation object.

This should be run when we write a new force field XML file.

Definition at line 364 of file smirnoffio.py.

Member Data Documentation

◆ A

src.smirnoffio.SMIRNOFF.A

Definition at line 416 of file smirnoffio.py.

◆ abspdb

src.smirnoffio.SMIRNOFF.abspdb

Definition at line 252 of file smirnoffio.py.

◆ AtomLists

src.smirnoffio.SMIRNOFF.AtomLists

Build a topology and atom lists.

Definition at line 348 of file smirnoffio.py.

◆ AtomMask

src.smirnoffio.SMIRNOFF.AtomMask

Definition at line 352 of file smirnoffio.py.

◆ B

src.smirnoffio.SMIRNOFF.B

Definition at line 418 of file smirnoffio.py.

◆ forcefield

src.smirnoffio.SMIRNOFF.forcefield

Definition at line 277 of file smirnoffio.py.

◆ freeze_atoms

src.smirnoffio.SMIRNOFF.freeze_atoms

Definition at line 303 of file smirnoffio.py.

◆ mmopts

src.smirnoffio.SMIRNOFF.mmopts

OpenMM options for setting up the System.

Definition at line 297 of file smirnoffio.py.

◆ mod

src.smirnoffio.SMIRNOFF.mod

Definition at line 294 of file smirnoffio.py.

◆ mol

src.smirnoffio.SMIRNOFF.mol

Definition at line 228 of file smirnoffio.py.

◆ mol2

src.smirnoffio.SMIRNOFF.mol2

Definition at line 242 of file smirnoffio.py.

◆ name

src.smirnoffio.SMIRNOFF.name

Definition at line 409 of file smirnoffio.py.

◆ nbcharges

src.smirnoffio.SMIRNOFF.nbcharges

Definition at line 378 of file smirnoffio.py.

◆ off_topology

src.smirnoffio.SMIRNOFF.off_topology

Load mol2 files for smirnoff topology.

Definition at line 291 of file smirnoffio.py.

◆ offxml

src.smirnoffio.SMIRNOFF.offxml

Definition at line 276 of file smirnoffio.py.

◆ pbc

src.smirnoffio.SMIRNOFF.pbc

Set system options from ForceBalance force field options.

Set system options from periodic boundary conditions.

Definition at line 316 of file smirnoffio.py.

◆ pdb

src.smirnoffio.SMIRNOFF.pdb

Definition at line 272 of file smirnoffio.py.

◆ realAtomIdxs

src.smirnoffio.SMIRNOFF.realAtomIdxs

Definition at line 353 of file smirnoffio.py.

◆ ref_mol

src.smirnoffio.SMIRNOFF.ref_mol

Definition at line 258 of file smirnoffio.py.

◆ restrain_k

src.smirnoffio.SMIRNOFF.restrain_k

Specify frozen atoms and restraint force constant.

Definition at line 301 of file smirnoffio.py.

◆ simkwargs

src.smirnoffio.SMIRNOFF.simkwargs

Definition at line 367 of file smirnoffio.py.

◆ system

src.smirnoffio.SMIRNOFF.system

Definition at line 372 of file smirnoffio.py.

◆ valkwd

src.smirnoffio.SMIRNOFF.valkwd

Definition at line 196 of file smirnoffio.py.

◆ xyz_omms

src.smirnoffio.SMIRNOFF.xyz_omms

print warning for 'nonbonded_cutoff' keywords

Generate OpenMM-compatible positions

Definition at line 322 of file smirnoffio.py.


The documentation for this class was generated from the following file: