pele.amber.read_amber#
- class pele.amber.read_amber.Atom
-
class Atom:Atom defined from the AMBER topology file.
- Atom.set_element()
-
def set_element(self, mass):Defines the element, based on the mass.
- Atom.set_residue()
-
def set_residue(self, residue):Defines the Residue to which the Atom belongs.
- Atom.__lt__()
-
def __lt__(self, other):Sort Atoms first by mass, then name, then index.
- class pele.amber.read_amber.Residue
-
class Residue:Residue defined from the AMBER topology file.
- Residue.add_atoms()
-
def add_atoms(self, atoms):Adds Atoms in atoms to the Residue and sets the residue for those Atoms accordingly.
- class pele.amber.read_amber.Molecule
-
class Molecule:Molecule defined from the AMBER topology file.
- Molecule.read_coords()
-
def read_coords(self, inpcrd_filename):Reads coordinates from a file into the Atoms of the Molecule.
- pele.amber.read_amber.split_len()
-
def split_len(seq, length):Returns a list containing the elements of seq, split into length-long chunks.
- pele.amber.read_amber.data_cast()
-
def data_cast(datum, type):Casts the datum as defined by type.
a = string i = integer e = float (in exponent notation)
- pele.amber.read_amber.read_topology()
-
def read_topology(filename):Reads a topology file, filename, and returns data blocks containing the topology data.
- pele.amber.read_amber.create_molecule()
-
def create_molecule(topology_data):This function takes a topology data set (topology_data) and returns a Molecule object containing a graph of the atoms and residues and their connectivity.
- pele.amber.read_amber.group_rotation_file()
-
def group_rotation_file(molecule, params, filename):Defines group rotation for bonds between atoms defined in params. This function DOESN’T check whether the atoms are actually bonded at any point (so make sure you’re referencing appropriate atom pairs).
atoms and residues are the atoms and residues lists returned from create_molecule()
params has the format:
params[(residue, (atom_x, atom_y))] = (rotation_scale, probability)e.g.
params[("ARG", ("CA", "CB"))] = (0.5, 0.2)rotates about the ARG CA-CB bond at most 90 degs each time, with probability 0.2.
- pele.amber.read_amber.get_rotated_atoms()
-
def get_rotated_atoms(bond):Returns a list of the atoms in the rotating group for the GROUPROTATION script.
bond has the format:
bond = (residue, (atom_x, atom_y))