pele.amber.read_amber#

class pele.amber.read_amber.Atom

Source

class Atom:

Atom defined from the AMBER topology file.

Atom.set_element()

Source

def set_element(self, mass):

Defines the element, based on the mass.

Atom.set_residue()

Source

def set_residue(self, residue):

Defines the Residue to which the Atom belongs.

Atom.__lt__()

Source

def __lt__(self, other):

Sort Atoms first by mass, then name, then index.

class pele.amber.read_amber.Residue

Source

class Residue:

Residue defined from the AMBER topology file.

Residue.add_atoms()

Source

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

Source

class Molecule:

Molecule defined from the AMBER topology file.

Molecule.read_coords()

Source

def read_coords(self, inpcrd_filename):

Reads coordinates from a file into the Atoms of the Molecule.

pele.amber.read_amber.split_len()

Source

def split_len(seq, length):

Returns a list containing the elements of seq, split into length-long chunks.

pele.amber.read_amber.data_cast()

Source

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()

Source

def read_topology(filename):

Reads a topology file, filename, and returns data blocks containing the topology data.

pele.amber.read_amber.create_molecule()

Source

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()

Source

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()

Source

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))