You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dseeliger edited this page Mar 31, 2015
·
1 revision
pmx.atom
class atom.Atom()
This class stores all properties (attributes) related to an atom. E.g., when pmx reads a pdb file, each line starting with "ATOM" or "HETATM" is converted to an Atom instance.
Hence, and atom object constructed from a pdb line contains:
atom id (atom.id)
atom name (atom.name)
residue name (atom.resname)
residue id (atom.resnr)
chain id (atom.chain_id)
coordinates (atom.x)
occupancy (atom.occ)
b-factor (atom.bfac)
In addition to storage properties, the atom class also has a number of methods:
atom.dist( atom2 ) ( distance between two atoms)
atom - atom2 ( same as above with overloaded "-" operator )
atom.dist2( atom2) (squared distance, faster than distance)
atom.angle( atom2, atom3, degree=True) angle calculation, returns rad by default )