| |
- mol2
- mol2_atom
- mol2_bond
- mol2_set
class mol2 |
|
This is to manage one mol2 series of lines on the form:
@<TRIPOS>MOLECULE
CDK2.xray.inh1.1E9H
34 37 0 0 0
SMALL
GASTEIGER
Energy = 0
@<TRIPOS>ATOM
1 C1 5.4790 42.2880 49.5910 C.ar 1 <1> 0.0424
2 C2 4.4740 42.6430 50.5070 C.ar 1 <1> 0.0447
@<TRIPOS>BOND
1 1 2 ar
2 1 6 ar |
|
Methods defined here:
- __init__(self, data)
- __repr__(self)
- get_atom(self, id)
- return the atom instance given its atom identifier
- get_bonded_atoms(self, id)
- return a dictionnary of atom instances bonded to the atom, and their types
- out(self, f=<open file '<stdout>', mode 'w' at 0x7fbf5edc4198>)
- parse(self, data)
- Parse a series of text lines,
and setup compound information
- set_charge_type(self, charge_type=None)
- bond identifier (integer, starting from 1)
- set_donnor_acceptor_atoms(self, verbose=0)
- modify atom types to specify donnor, acceptor, or both
- set_mol_name(self, mol_name=None)
- bond identifier (integer, starting from 1)
- set_mol_type(self, mol_type=None)
- bond identifier (integer, starting from 1)
- set_num_atoms(self, num_atoms=None)
- number of atoms (integer)
- set_num_bonds(self, num_bonds=None)
- number of bonds (integer)
- set_num_feat(self, num_feat=None)
- number of features (integer)
- set_num_sets(self, num_sets=None)
- number of sets (integer)
- set_num_subst(self, num_subst=None)
- number of substructures (integer)
|
class mol2_atom |
|
This is to manage mol2 atomic lines on the form:
1 C1 5.4790 42.2880 49.5910 C.ar 1 <1> 0.0424 |
|
Methods defined here:
- __init__(self, data=None)
- if data is passed, it will be installed
- __repr__(self)
- assemble the properties as a text line, and return it
- parse(self, data)
- split the text line into a series of properties
- set_atom_id(self, atom_id=None)
- atom identifier (integer, starting from 1)
- set_atom_name(self, atom_name=None)
- The name of the atom (string)
- set_atom_type(self, atom_type=None)
- The mol2 type of the atom
- set_charge(self, charge=None)
- atomic charge
- set_crds(self, x=None, y=None, z=None)
- the coordinates of the atom
- set_status_bit(self, status_bit=None)
- Never to use (in theory)
- set_subst_id(self, subst_id=None)
- substructure identifier
- set_subst_name(self, subst_name=None)
- substructure name
|
class mol2_bond |
|
This is to manage mol2 bond lines on the form:
1 1 2 ar |
|
Methods defined here:
- __init__(self, data=None)
- if data is passed, it will be installed
- __repr__(self)
- parse(self, data)
- split the text line into a series of properties
- set_bond_id(self, bond_id=None)
- bond identifier (integer, starting from 1)
- set_bond_type(self, bond_type=None)
- bond type (string)
one of:
1 = single
2 = double
3 = triple
am = amide
ar = aromatic
du = dummy
un = unknown
nc = not connected
- set_origin_atom_id(self, origin_atom_id=None)
- the origin atom identifier (integer)
- set_status_bit(self, status_bit=None)
- Never to use (in theory)
- set_target_atom_id(self, target_atom_id=None)
- the target atom identifier (integer)
|
class mol2_set |
| |
Methods defined here:
- __init__(self, data=None, subset=None)
- A collection is organized as a dictionnary of compounds
self.num_compounds : the number of compounds
self.compounds : the dictionnary of compounds
data : the data to setup the set
subset: it is possible to specify a subset of the compounds to load, based on their mol_name identifiers.
- parse(self, data, subset=None)
- parse a list of lines, detect compounds, load them
only load the subset if specified.
| |