fast_forward.map_file_parers module

class fast_forward.map_file_parers.MapDirector[source]

Bases: SectionLineParser

COMMENT_CHAR = ';'
METH_DICT = {('atoms',): (<function MapDirector._atoms>, {}), ('chiral',): (<function MapDirector._skip_line>, {}), ('from',): (<function MapDirector._skip_line>, {}), ('macros',): (<function SectionLineParser._macros>, {}), ('mapping',): (<function MapDirector._skip_line>, {}), ('martini',): (<function MapDirector._bead_order>, {}), ('molecule',): (<function MapDirector._molecules>, {}), ('out',): (<function MapDirector._skip_line>, {}), ('to',): (<function MapDirector._skip_line>, {}), ('trans',): (<function MapDirector._skip_line>, {})}

A dict of all known parser methods, mapping section names to the function to be called and the associated keyword arguments.

finalize(lineno=0)[source]

Called at the end of the file

parse_header(line, lineno=0)[source]

Parses a section header with line number lineno. Sets vermouth.parser_utils.SectionLineParser.section when applicable. Does not check whether line is a valid section header.

Parameters:
Returns:

The result of calling finalize_section(), which is called if a section ends.

Return type:

object

Raises:

KeyError – If the section header is unknown.

class fast_forward.map_file_parers.Mapping(from_resname, to_resname)[source]

Bases: object

add_atom(bead, idx, atom=None, weight=None)[source]
property beads
property n_beads
fast_forward.map_file_parers.read_mapping(lines)[source]

Parses lines of itp format and adds the molecule as a block to force_field.

Parameters: