meld.system.amber.ParmTopReader

class meld.system.amber.ParmTopReader(top_string)[source]

Bases: object

Read in information from parmtop file

__init__(top_string)[source]

Initialize ParmTopReader

Parameters

top_string (str) – topology string from tleap

Methods

__init__(top_string)

Initialize ParmTopReader

get_atom_map()

Get the atom map

get_atom_names()

Get the atom names

get_bonds()

Get the bonded atoms from topology

get_residue_names()

Get the residue names

get_residue_numbers()

Get the residue numbers

get_atom_map()[source]

Get the atom map

Return type

Dict[Tuple[int, str], int]

Returns

the mapping from (resid, atom_name) to atom_index

Note

both resid and atom_index are zero-based

get_atom_names()[source]

Get the atom names

Return type

List[str]

Returns

the name for each atom

get_bonds()[source]

Get the bonded atoms from topology

Return type

Set[Tuple[int, int]]

Returns

The set of bonds from the topology

Note

the indices are zero-based

get_residue_names()[source]

Get the residue names

Return type

List[str]

Returns

the residue name for each atom

get_residue_numbers()[source]

Get the residue numbers

Return type

List[int]

Returns

the residue number for each atom