-
Notifications
You must be signed in to change notification settings - Fork 69
pmx_molecule.md
dseeliger edited this page Mar 31, 2015
·
2 revisions
Some attributes:
- molecule.id ( molecule or residue id)
- molecule.resname ( name )
- molecule.atoms ( list of atoms )
Some methods:
see also Atomselection methods
There are a couple of methods that are protein specific
- molecule.get_phi( degree = True) ( return phi angle )
- molecule.get_psi()
- molecule.get_omega()
- molecule.get_chi( 1 )
- molecule.set_phi( new_phi, propagate = True ) ( set new phi angle and propagate change through the chain )
- molecule.set_psi(new_psi,...)
- molecule.set_omega( new_omega )
- molecule.set_chi(1, new_chi ) ( new value for chi 1 )
Other methods:
- molecule.set_resname( new_resname ) ( new residue name, atom residue names are renamed, too )
- molecule.insert_atom( position, Atom) ( insert a new atom at a certain position)
- molecule.append( Atom ) ( append new atom at the end of the atom list )
- molecule.remove(Atom) ( remove this atom )
- del molecule['CA'] ( remove atom with name CA )
- molecule.write( "out.pdb") ( write molecule as pdb )
- molecule.copy() ( make a hard copy of this molecule)
- molecule.new_aa( "A") ( create new alanine residue )
Construction options:
>>> mol = Molecule() # empty molecule
>>> mol = Molecule( atoms = list_of_atoms ) # create molecule from a list of atoms
>>> mol = Molecule().new_aa( "SER") # create serine