Rosetta 3.3
Classes | Functions | Variables
rosetta_py::io::mdl_molfile Namespace Reference

Classes

class  Molfile
class  Atom
class  Bond

Functions

def index_atoms
def find_rings
def file_or_filename
def read_mdl_molfile
def write_mdl_molfile
def read_mdl_sdf
def write_mdl_sdf
def read_tripos_mol2
def write_tripos_mol2
def sort_for_rosetta
def strip_H
def pdb_pad_atom_name
def uniquify_atom_names
def main

Variables

dictionary rosetta_to_pdb_names

Function Documentation

def rosetta_py::io::mdl_molfile::file_or_filename (   func)
A decorator for functions that interchangably take a file or filename as their first argument.
def rosetta_py::io::mdl_molfile::find_rings (   bonds)
A bond is in a ring iff there is an alternate path from a1 to a2.

An atom is in a ring iff it participates in any ring bonds.
Calling this function sets is_ring for all atoms and bonds.
def rosetta_py::io::mdl_molfile::index_atoms (   atoms)
Returns a dictionary of the 1-based indices of given Atoms.
def rosetta_py::io::mdl_molfile::main (   argv)
def rosetta_py::io::mdl_molfile::pdb_pad_atom_name (   atom)
Returns the atom name padded with whitespace to match the PDB conventions.
def rosetta_py::io::mdl_molfile::read_mdl_molfile (   f,
  do_find_rings = True 
)
Reads a molfile and returns a Molfile object.

f may be a file name or file handle.
def rosetta_py::io::mdl_molfile::read_mdl_sdf (   f,
  do_find_rings = True 
)
Lazily reads an sdf and returns an iterator over Molfile objects.
To get a list of all molfiles, do:  list(read_mdl_sdf(...))
To get just the first molfile, do:  next(read_mdl_sdf(...))

f may be a file name or file handle.
def rosetta_py::io::mdl_molfile::read_tripos_mol2 (   f,
  do_find_rings = True 
)
Lazily reads a mol2 and returns an iterator over Molfile objects.
To get a list of all molfiles, do:  list(read_tripos_mol2(...))
To get just the first molfile, do:  next(read_tripos_mol2(...))

f may be a file name or file handle.
def rosetta_py::io::mdl_molfile::sort_for_rosetta (   molfile)
Sorts the atoms and bonds of a Molfile into the order preferred by Rosetta:
Heavy atoms precede hydrogens, and bonds define a tree.
def rosetta_py::io::mdl_molfile::strip_H (   molfile,
  pred = lambda x: x.is_H 
)
Removes hydrogen atoms from a Molfile object, modifying it in place.
Can remove an arbitrary set of atoms by also passing a predicate
that takes an Atom and returns True for atoms to be removed.
def rosetta_py::io::mdl_molfile::uniquify_atom_names (   atoms,
  force = False 
)
If force is true, rename/number all atoms.
Otherwise, only rename/number atoms with non-unique names.
Return True iff atoms are renamed.
def rosetta_py::io::mdl_molfile::write_mdl_molfile (   f,
  molfile 
)
Writes a Molfile object to a file.

If atoms and/or bonds have been re-ordered since read-in,
this code will renumber everything appropriately.

f may be a file name or file handle.
def rosetta_py::io::mdl_molfile::write_mdl_sdf (   f,
  molfiles 
)
Writes a list of Molfile objects to a file.

If atoms and/or bonds have been re-ordered since read-in,
this code will renumber everything appropriately.

f may be a file name or file handle.
def rosetta_py::io::mdl_molfile::write_tripos_mol2 (   f,
  molfiles 
)
Writes a list of Molfile objects to a file.

If atoms and/or bonds have been re-ordered since read-in,
this code will renumber everything appropriately.

f may be a file name or file handle.

This function doesn't preserve everything, notably substructure records and amide bond types.

Variable Documentation

Initial value:
00001 {'CNH2':' C  ', 'COO ':' C  ', 'CH1 ':' C  ',
00002     'CH2 ':' C  ', 'CH3 ':' C  ', 'aroC':' C  ', 'Ntrp':' N  ', 'Nhis':' N  ',
00003     'NH2O':' N  ', 'Nlys':' N  ', 'Narg':' N  ', 'Npro':' N  ', 'OH  ':' O  ',
00004     'ONH2':' O  ', 'OOC ':' O  ', 'S   ':' S  ', 'Nbb ':' N  ', 'CAbb':' C  ',
00005     'CObb':' C  ', 'OCbb':' O  ', 'Hpol':' H  ', 'Hapo':' H  ', 'Haro':' H  ',
00006     'HNbb':' H  ', 'Phos':' P  '}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines