This package is used to assign the properties for atoms, residues and molecules
This function gets an Assign instance from smiles
parameters |
explanation |
smiles |
the smiles to get |
return |
the Assign instance |
This function gets an Assign instance from a pdb file
parameters |
explanation |
file |
the name of the input file or an instance of io.IOBase |
only_residue |
only get the residue with the name same as only_residue |
bond_tolerance |
the parameter to determine the atomic connections. The larger tolerance, the easier to set a bond between two atoms |
total_charge |
the total charge of the molecule used when aligning bond orders. If None is given, the total charge will not be checked |
return |
the Assign instance |
This function gets an Assign instance from a ResidueType instance
parameters |
explanation |
restype |
the ResidueType instance |
return |
the Assign instance |
This function gets an Assign instance from a xyz file
parameters |
explanation |
file |
the name of the input file or an instance of io.IOBase |
bond_tolerance |
the parameter to determine the atomic connections. The larger tolerance, the easier to set a bond between two atoms |
total_charge |
the total charge of the molecule used when aligning bond orders. If None is given, the total charge will not be checked |
return |
the Assign instance |
This function gets an Assign instance from a mol2 file
parameters |
explanation |
file |
the name of the input file or an instance of io.IOBase |
total_charge |
the total charge of the molecule used when aligning bond orders. If "sum" is given, the sum of the partial charges will be used; If None is given, the total charge will not be checked |
return |
the Assign instance |
This function gets an Assign instance and a preprocessed lattice information from a cif file
parameters |
explanation |
file |
the name of the input file or an instance of io.IOBase |
total_charge |
the total charge of the molecule used when aligning bond orders. 0 for default. |
orthogonal_threshold |
cell angle with the difference less than this parameter will be considered to be orthogonal (in degree, and 5 for default) |
return |
the Assign instance and a dict which stores the preprocessed lattice information |
This class is to be the rule to determine the atom type for one atom
parameters |
explanation |
name |
the name of the rule |
This function is used as a decorator to add the atom type - judge function
parameters |
explanation |
atomtype |
a string or an AtomType instance |
priority |
if more than one judge function returns True, the atom type with higher priority will be chosen. If the priority levels of the functions are the same, the atom type which is added first will be chosen. |
return |
a function, which wraps a judge function (receiving the Assign instance and the atom index and giving True or False as a result) |
parameters |
explanation |
assign |
|
rings |
|
parameters |
explanation |
assign |
|
rings |
|
parameters |
explanation |
assign |
|
parameters |
explanation |
assign |
|
¶ check_pure_aliphatic_and_planar
parameters |
explanation |
assign |
|
parameters |
explanation |
assign |
|
parameters |
explanation |
assign |
|
This class is used to assign properties for atoms, which is called an "assignment"
parameters |
explanation |
name |
the name of the molecule |
This function renames the atoms by adding the index to the element name
This function helps judge whether the atom belongs to the mask. For example, "O2" means an oxygen atom connected to two other atoms, "N4" means a nitrogen atom connected to four other atoms.
parameters |
explanation |
atom |
the index of the atom |
string |
a string mask of a list of string masks. |
This function adds an atom to the Assign
parameters |
explanation |
element |
the chemical symbol for the element. "O" - oxygen, "H" - hydrogen for example. |
x |
the x coordinate |
y |
the y coordinate |
z |
the z coordinate |
name |
the name of the atom |
charge |
the charge of the atom |
This function adds a marker to an atom
parameters |
explanation |
atom |
the atom index |
marker |
the marker |
This function adds a bond to two atoms
parameters |
explanation |
atom1 |
the index of the first atom |
atom2 |
the index of the the second atom |
order |
the bond order |
This function adds a marker to a bond
parameters |
explanation |
atom1 |
the index of the first atom |
atom2 |
the index of the the second atom |
marker |
the marker |
only1 |
only add the marker to the atom1 - atom2 bond instead of the atom2 - atom1 bond |
This function deletes the atom
parameters |
explanation |
atom |
the index of the atom to delete |
This function deletes the bond between two atoms
parameters |
explanation |
atom1 |
the index of the first atom |
atom2 |
the index of the the second atom |
This function dertermines the chemical equalvalent atoms
return |
a list of equalvalent atom index lists |
¶ determine_ring_and_bond_type
This function determine the ring and the bond type
This function determines the atom type.
parameters |
explanation |
rule |
a string or an AssignRule instance |
return |
if the attribute "pure_string" of the rule is False, the atom types will be saved inplace and return |
This function determines the connectivity based on atomic distances
parameters |
explanation |
simple_cutoff |
the distance cutoff to determine whether the two atoms are connected. If None (default), |
tolerance |
the tolerance factor for the default method |
This function checks whether all atoms are connected in one graph
This function converts the Assign instance to the ResidueType instance
parameters |
explanation |
name |
the name of the ResidueType instance |
charge |
the charge of atoms. If set to None, internal charge will be used |
return |
the ResidueType instance |
This function calculates the partial charge for every atom.
parameters |
explanation |
method |
the method to calculate the charge |
parameters |
the parameters to calculate the charge |
This function kekulizes the structure.
This function uses rdkit and uff to optimize the structure
This function saves the instance as a pdb file
parameters |
explanation |
filename |
the name of the output file |
This function saves the instance as a mol2 file
parameters |
explanation |
filename |
the name of the output file |
atomtype |
the rule of atom types. |
This function sets the pH value, and adds or deletes the related hydrogens.
parameters |
explanation |
ph |
the pH value |
return |
the sum of final formal charge |