Create MDAnalysis AtomGroups from a Universe and an index file.
Examples
u = mda.Universe(TPR, XTC) with open('index.ndx') as infile: for group_name, atom_group in ndx_to_ag(u, infile): print(group_name, atom_group)
atoms_or_universe (Universe or AtomGroup) – The atoms to select from.
Universe
AtomGroup
infile (str) – The open index file to read.
group_name (str) – The name of the group as written in the index file.
atoms (AtomGroup) – An atom group containing the atoms for that group.
ff_map
ff_inter
ff_assess