systems

class atomsmm.systems.RESPASystem(system, rcutIn, rswitchIn, **kwargs)[source]

Bases: simtk.openmm.openmm.System

An OpenMM System prepared for Multiple Time-Scale Integration with RESPA.

Parameters
  • system (openmm.System) – The original system from which to generate the RESPASystem.

  • rcutIn (unit.Quantity) – The distance at which the short-range nonbonded interactions will completely vanish.

  • rswitchIn (unit.Quantity) – The distance at which the short-range nonbonded interactions will start vanishing by application of a switching function.

Keyword Arguments
  • adjustment (str, optional, default='force-switch') – A keyword for modifying the near nonbonded potential energy function. If it is None, then the switching function is applied directly to the original potential. Other options are ‘shift’ and ‘force-switch’. If it is ‘shift’, then the switching function is applied to a potential that is already null at the cutoff due to a previous shift. If it is ‘force-switch’, then the potential is modified so that the switching function is applied to the forces rather than the potential energy.

  • fastExceptions (bool, optional, default=True) – Whether nonbonded exceptions must be considered to belong to the group of fastest forces. If False, then they will be split into intermediate and slowest forces.

redefine_bond(topology, residue, atom1, atom2, length, K=None, group=1)[source]

Changes the equilibrium length of a specified bond for integration within its original time scale. The difference between the original and the redefined bond potentials is evaluated at another time scale.

Parameters
  • topology (openmm.Topology) – The topology corresponding to the original system.

  • residue (str) – A name or regular expression to identify the residue which contains the redefined bond.

  • atom1 (str) – A name or regular expression to identify the first atom that makes the bond.

  • atom2 (str) – A name or regular expression to identify the second atom that makes the bond.

  • length (unit.Quantity) – The redifined equilibrium length for integration at the shortest time scale.

  • K (unit.Quantity, optional, default=None) – The harmonic force constant for the bond. If this is None, then the original value will be maintained.

  • group (int, optional, default=1) – The force group with which the difference between the original and the redefined bond potentials must be evaluated.

redefine_angle(topology, residue, atom1, atom2, atom3, angle, K=None, group=1)[source]

Changes the equilibrium value of a specified angle for integration within its original time scale. The difference between the original and the redefined angle potentials is evaluated at another time scale.

Parameters
  • topology (openmm.Topology) – The topology corresponding to the original system.

  • residue (str) – A name or regular expression to identify the residue which contains the redefined angle.

  • atom1 (str) – A name or regular expression to identify the first atom that makes the angle.

  • atom2 (str) – A name or regular expression to identify the second atom that makes the angle.

  • atom3 (str) – A name or regular expression to identify the third atom that makes the angle.

  • angle (unit.Quantity) – The redifined equilibrium angle value for integration at the shortest time scale.

  • K (unit.Quantity, optional, default=None) – The harmonic force constant for the angle. If this is None, then the original value will be maintained.

  • group (int, optional, default=1) – The force group with which the difference between the original and the redefined angle potentials must be evaluated.

class atomsmm.systems.SolvationSystem(system, solute_atoms, use_softcore=True, softcore_group=0, split_exceptions=False)[source]

Bases: simtk.openmm.openmm.System

An OpenMM System prepared for solvation free-energy calculations.

Parameters
  • system (openmm.System) – The original system from which to generate the SolvationSystem.

  • solute_atoms (set(int)) – A set containing the indexes of all solute atoms.

  • use_softcore (bool, optional, default=True) – Whether to define a softcore potential for the coupling/decoupling of solute-solvent Lennard-Jones interactions. If this is False, then a linear scaling of both sigma and epsilon will be applied instead.

  • softcore_group (int, optional, default=0) – The force group to be assigned to the solute-solvent softcore interactions, if any.

  • split_exceptions (bool, optional, default=False) – Whether preexisting exceptions should be separated from the nonbonded force before new exceptions are created.

class atomsmm.systems.AlchemicalSystem(system, atoms, coupling='softcore', group=0, use_lrc=False)[source]

Bases: simtk.openmm.openmm.System

An OpenMM System prepared for solvation free-energy calculations.

Parameters
  • system (openmm.System) – The original system from which to generate the SolvationSystem.

  • atoms (set(int)) – A set containing the indexes of all solute atoms.

  • coupling (str, optional, default=’softcore’) – The model used for coupling the alchemical atoms to the system. The options are softcore, linear, art, spline, or some function of lambda_vdw. Use softcore for the model of Beutler et al. (1994), linear for a simple linear coupling, art for the sine-based coupling model of Abrams, Rosso, and Tuckerman (2006), and spline for multiplying the solute-solvent interactions by \(\lambda_\mathrm{vdw}^3(10 - 15 \lambda_\mathrm{vdw} + 6 \lambda_\mathrm{vdw}^2)\). Alternatively, you can enter any other valid function of lambda_vdw.

  • group (int, optional, default=0) – The force group to be assigned to the solute-solvent softcore interactions, if any.

  • use_lrc (bool, optional, defaul=False) – Whether to use long-range (dispersion) correction in solute-solvent interactions.

class atomsmm.systems.AlchemicalRespaSystem(system, rcutIn, rswitchIn, alchemical_atoms=[], coupling_parameter='lambda', coupling_function='lambda', middle_scale=True, coulomb_scaling=False, lambda_coul=0, use_softcore=False, split_alchemical=True)[source]

Bases: simtk.openmm.openmm.System

An OpenMM System prepared for Multiple Time-Scale Integration with RESPA and for alchemical coupling/decoupling of specified atoms.

Short-range forces for integration at intermediate time scale are generated by applying a switching function to the force that results from the following potential:

\[\begin{split}& V(r)=V^\ast_\mathrm{LJC}(r)-V^\ast_\mathrm{LJC}(r_\mathrm{cut,in}) \\ & V^\ast_\mathrm{LJC}(r)=\left\{ 4\epsilon\left[f_{12}(u(r))\left(\frac{\sigma}{r}\right)^{12}-f_6(u(r))\left(\frac{\sigma}{r}\right)^6\right] + \frac{f_1(u(r))}{4\pi\epsilon_0}\frac{q_1 q_2}{r} \right\}\end{split}\]

where \(f_n(u)\) is the solution of the 1st order differential equation

\[\begin{split}& f_n-\frac{u+b}{n}\frac{df_n}{du}=S(u) \\ & f_n(0)=1 \\ & b=\frac{r_\mathrm{switch,in}}{r_\mathrm{cut,in}-r_\mathrm{switch,in}}\end{split}\]

As a consequence of this modification, \(V^\prime(r)=S(u(r))V^\prime_\mathrm{LJC}(r)\).

Examples of coupling function are:

  1. Linear coupling (default):

\[f(\lambda) = \lambda\]
  1. A 5-th order polinomial whose 1st- and 2nd-order derivatives are null at both extremes.

\[f(\lambda) = \lambda^3(10 - 15 \lambda + 6 \lambda^2)\]

3. A 5-th order polinomial whose 1st-order derivative is null at both extremes and whose 2nd- and 3rd-order derivatives are also null at \(\lambda = 0\):

\[f(\lambda) = \lambda^4(5 - 4 \lambda)\]
  1. The sine-based coupling model of Abrams, Rosso, and Tuckerman [15]:

\[f(\lambda) = \lambda - \frac{\sin\left(2\pi \lambda\right)}{2\pi}\]
Parameters
  • system (openmm.System) – The original system from which to generate the SolvationSystem.

  • rcutIn (unit.Quantity) – The distance at which the short-range nonbonded interactions will completely vanish.

  • rswitchIn (unit.Quantity) – The distance at which the short-range nonbonded interactions will start vanishing by application of a switching function.

  • alchemical_atoms (list(int), optional, default=[]) – A set containing the indexes of all alchemical atoms.

  • coupling_parameter (str, optional, defaul=’lambda’) – The name of the coupling parameter.

  • coupling_function (str, optional, default=’lambda’) – A function \(f(\lambda)\) used for coupling the alchemical atoms to the system, where \(\lambda\) is the coupling parameter. This must be a function of a single variable named as in argument coupling_parameter (see above). It is expected that \(f(0) = 0\) and \(f(1) = 1\).

  • middle_scale (bool, optional, default=True) – Whether to use an intermediate time scale in the RESPA integration.

  • coulomb_scaling (bool, optional, default=False) – Whether to consider scaling of electrostatic interactions between alchemical and non-alchemical atoms. Otherwise, these interactions will not exist.

  • lambda_coul (float, optional, default=0) – A scaling factor to be applied to all electrostatic interactions between alchemical and non-alchemical atoms.

reset_coulomb_scaling_factor(lambda_coul, context=None)[source]

Resets the scaling factor of the solute-solvent electrostatic interactions.

Parameters
  • lambda_coul (float) – The scaling factor value.

  • context (Context_, optional, default=None) – A context in which the particle parameters should be updated.

class atomsmm.systems.ComputingSystem(system)[source]

Bases: atomsmm.systems._AtomsMM_System

An OpenMM System prepared for computing the Coulomb contribution to the potential energy, as well as the total internal virial of an atomic system.

..warning:

Currently, virial computation is only supported for fully flexible systems (i.e. without distance constraints).

Parameters

system (openmm.System) – The original system from which to generate the ComputingSystem.