Collective Variables

Overview

plugin_muMC.collectives.Molecules

Collection of molecules for which hashes will be computed.

plugin_muMC.collectives.LipidLeaflet

Adds the lipid leaflet as a molecular descriptors of molecules for the purposes of computing chemical potentials.

Details

class plugin_muMC.collectives.LipidLeaflet(molecules)

Bases: plugin_muMC.collectives._compute

Adds the lipid leaflet as a molecular descriptors of molecules for the purposes of computing chemical potentials.

The fragment name generated is always ‘leaflet’ and potential values are ‘lower’ and ‘upper’. Leaflet determination is done by computing a local midplane. This is computed by decomposing the bilayer into a grid structure, with cells of size ~Rcut, a value that needs to be specified by calling setCellListRCut.

Parameters

molecules (Molecules) – Ensemble on which to compute leaflet side

setCellListRCut(rcut)

Sets the minimal size of cells used to compute the local bilayer midplane

Parameters

rcut (float) – grid cell size

Returns

None

class plugin_muMC.collectives.Molecules(group, name='')

Bases: plugin_muMC.collectives._compute

Collection of molecules for which hashes will be computed.

Hashes and molecule tables can be written to GSD files by using the dump_state method of hoomd gsd writers. In GSD files, information will be written in chunks “state/molecules+name/hash” and “state/molecules+name/molecules”, where name is the name suffix given to this ensemble.

The molecule parser assumes that every bead connected by either bonds or constraints belongs to the same molecule, even if intermediary beads are not in the hoomd group supplied. To give an example, if we have a molecule A - B - C - D, and the hoomd group contains beads A and D, this will still constitute a single molecule.

Parameters
fragments()

iterator over the states. Object iterated over is a dictionary that contains every descriptor used (e.g. chemical nature in semi-grand canonical ensembles and lipid leaflet), as well as the associated hash hash (with key ‘hash’).

Returns

Dictionary-like object with state description

potential()

Computes the sum of product of chemical potential with population of a given state

Returns

sum

Return type

float

set_mu(state, value)

Sets the chemical potential of a given chemical state

Parameters
  • state (int) – hash value of the state

  • value (float) – chemical potential of the hash

Returns

None