fast_forward.itp_to_ag module

Extract interactions pairs from itp and convert to atom groups of an MDAnalysis Universe.

class fast_forward.itp_to_ag.ITPInteractionMapper(universe, blocks, molnames)[source]

Bases: object

Class to extract interaction groups from itp files and map them to indices in an MDAnalysis Universe.

Parameters:
get_interactions_group(molname, int_mode=False)[source]

Iterate over interactions in itp file and return dict of grouped indices corresponding to the atoms in universe.

get_pairwise_interaction(molname)[source]

Iterate over all atoms in itp file and return dict of paired indices corresponding to all pairwise distances in universe. group_names are given by the atomnames

fast_forward.itp_to_ag.find_mol_indices(universe, atoms, moltypes)[source]

Given a universe select all atoms that belong to molecules of the given moltype. Subsequently, return indices of all multiples of the indices defined in atoms under the assumption that all considered molecules have the same number of atoms.

Parameters:
Returns:

list of ndarray

Return type:

list