classMolecule
The major class of MolecularComponents is classMolecule, which classPolymer, classWater, and classLigand all inherit from.
Attributes
x.atoms
list of atoms
x.atom_dict
dictionary of atoms; indexed by atom_number
x.features
features dictionary
x.centroid
centroid point object
x.chain_name
chain name
x.res_type
res_type -- if polymer, the first monomer's res_type is used
x.selected
selected boolean ()
x.visible
'is currently visible' bool (described in class MolecularViewer)
x.vtk_arg_list
a list of visualization args (described in MolecularViewer)
Functions
x.add_atom(atom)
adds an atom to both .atoms and .atom_dict
x.get_bounds()
uses atoms to determine x, y, and z bounds
x.len()
returns the number of atoms
x.pdb_print()
calls pdb_print on every atom in x.atoms
x.get_pdb_lines()
returns pdb lines as a list of strings
x.select()
selects all atoms
x.deselect()
deselects all atoms
x.get_bonds_list(atom)
used during initialization; locates the .atoms index of the argument atom for x.get_bonds_list_from_int()
x.get_bonds_list_from_int(index)
uses the index to access self.atoms[index]. Returns a set of coordinates denoting the half-way point to all of the covalently bonded atoms. This is only used for graphics, but can be modified to give the covalently bonded atoms themselves.
x.min_bonded_distance(atom1, atom2)
returns the minimum distance for two atoms to be bonded, given their atom types.
x.get_central_pt()
only works for classes AminoAcid and Nucleotide. Returns the alpha carbon atom coordinates for amino acids, or the 'C3' atom from nucleotides. Returns a Point object.
x.update_cfs(coor_list)
updates the coordinates (ie. transition to the next conformer). This accepts a list of stings as input, where the format is - res_type res_number chain_name float float float ... The float float float triples should be in the same order as the atoms in the pdb file for that residue
x.build_futamura_intersection_table(solvent_radius)
adds x.x_table to the molecule's features. The x_table is a dictionary, indexed by the atom_number of all atoms in the molecule. Each element of the dictionary contains a list of various info on atoms that are distanced from each other by less than the solvent_radius argument given.
x.fill_densities(distance_cutoff)
Calculates atomic densities for all atoms. This is the number of atoms within a sphere of radius distance_cutoff from each query atom. The number over the max seen over the molecule is added to the atom's .features dictionary under the index 'atomic_density'.
Copyright © 2001