BioSimSpace._Config.Somd

class BioSimSpace._Config.Somd(system, protocol, property_map={})[source]

A class for generating configuration files for SOMD.

__init__(system, protocol, property_map={})[source]

Constructor.

Parameters:
  • system (System) – The molecular system.

  • protocol (Protocol) – The protocol for the process.

  • property_map (dict) – A dictionary that maps system “properties” to their user defined values. This allows the user to refer to properties with their own naming scheme, e.g. { “charge” : “my-charge” }

Methods

__init__(system, protocol[, property_map])

Constructor.

createConfig([extra_options, extra_lines])

Create the list of configuration strings.

hasBox(system[, property_map])

Whether the system has a box.

hasWater(system)

Whether the system is contains water molecules.

isRestart()

Return whether this is a restart simulation.

reportInterval()

Return the report interval based on the protocol value.

restartInterval()

Return the restart interval based on the protocol value.

steps()

Return the number of integration steps based on the protocol value.

createConfig(extra_options={}, extra_lines=[])[source]

Create the list of configuration strings.

extra_optionsdict

A dictionary containing extra options. Overrides the defaults generated by the protocol.

extra_lines[str]

A list of extra lines to put at the end of the configuration file.

Returns:

config – The list of SOMD format configuration strings.

Return type:

[str]

static hasBox(system, property_map={})

Whether the system has a box.

Parameters:
  • system (System) – The molecular system.

  • property_map (dict) – A dictionary that maps system “properties” to their user defined values. This allows the user to refer to properties with their own naming scheme, e.g. { “charge” : “my-charge” }

Returns:

has_box – Whether the system has a simulation box.

Return type:

bool

static hasWater(system)

Whether the system is contains water molecules.

Parameters

systemSystem

The molecular system.

Returns:

has_water – Whether the system contains water molecules.

Return type:

bool

isRestart()

Return whether this is a restart simulation.

Returns:

is_restart – Whether this is a restart simulation.

Return type:

bool

reportInterval()

Return the report interval based on the protocol value.

Returns:

report_interval – The report interval in integration steps.

Return type:

int

restartInterval()

Return the restart interval based on the protocol value.

Returns:

restart_interval – The restart interval in integration steps.

Return type:

int

steps()

Return the number of integration steps based on the protocol value.

Returns:

steps – The number of integration steps.

Return type:

int