ProtoCaller.Wrappers.biosimspacewrapper module

This is the module which adds some extra functions on top of BioSimSpace which are used during different parts of the code. Here it is possible to centre a system in a box and resize the dimensions of the box. More advanced functions allow REST2-like rescaling and dummy bond rescaling for the final lambda value of the perturbation.

ProtoCaller.Wrappers.biosimspacewrapper.centre(system, box_length)

Centres the system given a box length.

Parameters
  • system (BioSimSpace.System) – The input system to be centred.

  • box_length (float, iterable) – Length of the box in nm.

Returns

  • system (BioSimspace.System) – The centred BioSimSpace system.

  • box_length (tuple) – The new box length. Only different from the input value if the box is too small for the system.

  • translation_vec (Sire.Maths.vector) – The centering translation vector.

ProtoCaller.Wrappers.biosimspacewrapper.rescaleBondedDummies(system, scale, bonds=None)

Rescales bonds which are connected to the dummy atoms

Parameters
  • system (BioSimSpace.System) – Input system to be modified.

  • scale (float) – Multiplication factor for the bond length. 0.5 < scale < 1 for best performance. If scale is too low, the user might encounter numerical stability problems in the simulation.

  • bonds ({str: [(int, int)]}) – A dictionary which contains all of the bonds to be rescaled. Its keys contain the name of the molecule, and the values are lists of tuples which contain the bond indices to be rescaled. Default: all dummy bonds in the system are rescaled.

Returns

system_new – The rescaled system.

Return type

BioSimSpace.System

ProtoCaller.Wrappers.biosimspacewrapper.rescaleSystemParams(system, scale, includelist=None, excludelist=None, neutralise=True)

Rescales charge, Lennard-Jones and dihedral parameters for REST(2).

Parameters
  • system (BioSimSpace.System) – Input system to be rescaled.

  • scale (float) – Multiplication factor for the charge, Lennard-Jones and dihedral parameters. 0 < scale < 1.

  • includelist ([str]) – Molecule names to be included in the rescaling. Default: None.

  • excludelist ([str]) – Molecule names to be excluded in the rescaling. Default: [“WAT”].

  • neutralise (bool) – Whether to rescale a minimum number of Na+ or Cl- ions so that the rescaled part of the system is neutralised.

Returns

system_new – The rescaled system.

Return type

BioSimSpace.System

ProtoCaller.Wrappers.biosimspacewrapper.resize(system, box_length)

Changes the box size of the system or adds one if there is no box.

Parameters
  • system (BioSimSpace.System) – The input system to be resized.

  • box_length (float, iterable) – Length of the box in nm.

Returns

system – The resized system.

Return type

BioSimSpace.System