Molecule¶
This class stores arrays of atoms. It is also used for residues within
polymers, such as amino acids within a protein. As such, a Molecule
instance has id, resname, and atoms attributes.
API Reference¶
-
class
pmx.molecule.Molecule(**kwargs)¶ Class for storing molecule/residue data.
-
resname¶ residue/molecule name
- Type
str
-
id¶ residue ID
- Type
int
-
natoms¶ number of atoms in the Molecule
- Type
int
-
atoms¶ list of atoms in Molecule
- Type
list
-
chain_id¶ ID of the chain the residue is part of
- Type
int
-
moltype¶ the type of molecule/residue (protein, dna, rna, ion, water, or unknown).
- Type
str
Methods
set_resname(resname)Set the residue name.
set_resid(resid)Set the residue ID.
insert_atom(pos, atom[, id])Insert an atom at a certain position.
append(atom)Append an atom to the Molecule.
remove_atom(atom)Delete an atom from Molecule.
fetch(key[, how, wildcard])Fetch atoms.
fetchm(keys[, how])Fetch multiple atoms.
is_hybrid()Checks whether the molecule/residue is a pmx hybrid.
rename_atoms_to_gmx()Renames atoms to comply with Gromacs syntax.
-