espressopp.System

The main purpose of this class is to store pointers to some important other classes and thus make them available to C++. In a way the System class can be viewed as a container for system wide global variables. If you need to run more than one system at the same time you can combine several systems with the help of the Multisystem class.

In detail the System class holds pointers to:

  • the storage (e.g. DomainDecomposition)
  • the boundary conditions bc for the system (e.g. OrthorhombicBC)
  • a random number generator rng which is for example used by a thermostat
  • the skin which is needed for the Verlet lists and the cell grid
  • a list of short range interactions that apply to the system these interactions are added with the addInteraction() method of the System

Example (not complete):

>>> LJSystem      = espressopp.System()
>>> LJSystem.bc   = espressopp.bc.OrthorhombicBC(rng, boxsize)
>>> LJSystem.rng
>>> LJSystem.skin = 0.4
>>> LJSystem.addInteraction(interLJ)
espressopp.System()
espressopp.System.addInteraction(interaction, name)
Parameters:
  • interaction
  • name (string) – The optional name of the interaction.
Return type:

bool

espressopp.System.getInteraction(number)
Parameters:number
Return type:
espressopp.System.getNumberOfInteractions()
Return type:
espressopp.System.removeInteraction(number)
Parameters:number
Return type:
espressopp.System.removeInteractionByName(self, name)
Parameters:name (str) – The name of the interaction to remove.
espressopp.System.getAllInteractions()
Return type:The dictionary with name as a key and Interaction object.
espressopp.System.scaleVolume(*args)
Parameters:*args
Return type:
espressopp.System.setTrace(switch)
Parameters:switch