Martini handlers

Overview

hoobas.MartiniModels.MartiniChain General implementation of most Martini chains (lipids or others).
hoobas.MartiniModels.ITPMartiniParser Generate a topology from an ITP file
hoobas.MartiniModels.MartiniForceMappings Martini force mapping; use the get_pair(beadA, beadB, units) to get the LJ potential.

Details

class hoobas.MartiniModels.ITPMartiniParser(itp_path, gro_path=None, **kwargs)[source]

Generate a topology from an ITP file

class hoobas.MartiniModels.MMaps[source]

Class that allows for global remapping of martini types in case they are needed. By default, martini bead names are charged, polar, nonpolar and apolar. By calling MartiniMapping.remap, they can be changed. For instance, MartiniMappings.remap(‘charged_0’, ‘Q00’) will make all charged beads with sub 0 to have the name ‘Q00’. This is useful for conflicting names like ‘Na’ which may conflict with sodium ions

static map()[source]

Returns the Martini mapping

Returns:map
Return type:dict
static map_from_default(default_name)[source]

Returns the current beadtype of a default martini beadtype. For instance if P2 was remapped to Po2, then map_from_default(P2) will yield Po2

Parameters:default_name (str) – default Martini mapping
Returns:mapped beadtype
Return type:str
static remap(key, beadtype)[source]

Remaps a martini type to a new beadtype

Parameters:
  • key (str) – martini type to remap
  • beadtype (str) – beadtype to map to
Returns:

None

static reverse_lookup(beadname)[source]

Search which martini type a given beadtype corresponds to

Parameters:beadname (str) – bead to search
Returns:Martini type
Return type:str
static type_from_default(default_name)[source]

Returns the martini type of a given default beadtype :param default_name: beadtype :type default_name: str :return: martini type :rtype: str

class hoobas.MartiniModels.MartiniChain(**kwargs)[source]

General implementation of most Martini chains (lipids or others). Sets the bond length, units and Martini mappings

class hoobas.MartiniModels.MartiniForceMappings[source]

Martini force mapping; use the get_pair(beadA, beadB, units) to get the LJ potential.

static get_pair(beadtypeA, beadtypeB, units=None)[source]

Returns the pair ineraction parameters between two beadtypes. Units can be supplied, otherwise it uses whichever units were defined as default

Parameters:
  • beadtypeA (str) – first beadtype
  • beadtypeB (str) – second beadtype
  • units (SimulationUnits) – units of the LJ parameters
Returns:

LJ parameters

Return type:

dict

class hoobas.MartiniModels.MartiniMappings[source]

Some syntaxic sugar for python to make it able to call MartiniMappings[key] directly

exception hoobas.MartiniModels.ParsingError[source]