Updater¶
Overview
Describes bead states available to a ManyStateSwitcher. |
|
Flips lipids between leaflets |
Details
-
class
plugin_muMC.update.BilayerInverter(molecules, leaflet)¶ Bases:
plugin_muMC.update._updaterFlips lipids between leaflets
After flip() is called, this updater will select between 1 and maxFlips lipids from a leaflet and brutally flip them to the opposite leaflet within the next 100 timesteps.
- Parameters
molecules (collectives.Molecules) – Set of molecules for which leaflets should be inverted
leaflet (collectives.LipidLeaflet) – Leaflet collective variable object
-
flip()¶ Perform a flip event within the next 100 timesteps
- Returns
-
class
plugin_muMC.update.ManyStatesSwitcher(group, molecules, descriptor, seed=numpy.random.randint, stateNames=None, period=20, phase=0, kT=1.0, name=None)¶ Bases:
plugin_muMC.update._updaterAttempts swaps between molecules chemical states to enforce a semi-grand canonical ensemble
The semi-grand canonial ensemble can be used to change bead nature (non-bonded interactions) as well as angle potentials. In the latter case, it will swap angles where the bead is centered on. If we consider a set of molecules comprised of three beads of type A and B and angles ‘A’ and ‘B’, potential molecules types are AAA (with angle ‘A’), AAB (with angle ‘A’) ABA (with angle ‘B’), ABB (with angle ‘B’), … Note that in this case AAB and BAA would be different molecules.
The semi-grand canonical ensemble can swap angle and/or bead types independently, i.e., one of the sets of lists may be left empty.
Different ensembles can be used for different parts of the molecule. In such cases, they should be executed on different phases
- Parameters
group (hoomd.group.group) – group on which to perform MC swaps
molecules (collectives.Molecules) – molecule descriptors
descriptor (StateDescriptor) – description of the available states
seed (int) – seed for RNG generation
stateNames (list[str]) – List of names associated with the different states. This is used to generate fragment description, in turn used to translate hash values into chemical information. Defaults to combination of angle and chemical types
period (int) – MC update frequency
phase (int) – When -1, start on the current time step. When >= 0, execute on steps where (step + phase) % period == 0. (see standard hoomd updater configuration)
kT (float) – temperature of the updater, used to compute probability exp(-E / kT)
name (str) – Suffix of name of this set of chemical potentials for fragment based chemical potential setting (see Molecules objects). Name of the fragment is SGC+name
-
setRCut(value)¶ Set minimal cell width for checkerboard decomposition. This value should be at least equal to interaction length
- Parameters
value (float) – Rcut value
- Returns
-
set_params(kT=None)¶ Sets semi-grand canonical parameter kT :param kT: Simulation temperature :return:
-
update_molecules()¶ Recompute states, for instance after restoring a snapshot
- Returns
-
class
plugin_muMC.update.StateDescriptor(charges=None, charge_force=None, types=None, type_force=None, angles=None, angle_force=None)¶ Bases:
objectDescribes bead states available to a ManyStateSwitcher.
The description is a series of lists (or None) of equal length. Index 0 of every list will describe state 0 and so on. The MC update force objects need to be passed as lists as well, with the notable exception of charge, which is a single entity since the force only depends on charge.
- Parameters
charges (list[float]) – List of charges, in simulation units (e.g. [0, 0.23, -0.23])
charge_force (pair.charge_mc) – MC computation of charge changes
type_force (list[pair.lj_mc]) – force objects associated with type change for MC updates
angles (list[str]) – List of angle types (eg [‘Sat180’, ‘Unsat120’])
angle_force (list[angle.cosinesq]) – force objects associated with angle changes for MC updates