This module is used to provide help functions and classes
This function is used to print some contents according to the verbose level in GlobalSetting
parameters |
explanation |
to_print |
the contents to print |
verbose |
only print when the verbose level is not less than this value |
This function sets the mode to debug or not
parameters |
explanation |
mode |
the value to set the debug mode |
This function is used to return a function to add a static method _unit_transfer
for a class.
parameters |
explanation |
sometype |
the class |
This function is used to return a function to add a static method _unit_transfer
for a class.
parameters |
explanation |
sometype |
the class |
the gloabl verbose level
This function is used to add the residue name mapping to the property PDBResidueNameMap
parameters |
explanation |
place |
head or tail |
pdb_name |
the residue name in pdb |
real_name |
the residue name in Python |
This function is used to disables the types of bonded forces when building.
parameters |
explanation |
types |
the types to set |
This function is used to disables the types of bonded forces except named here when building.
parameters |
explanation |
types |
the types to set |
This class is used to be a dict which can give not_found_message
parameters |
explanation |
not_found_method |
the method (function) which will accept the key and return the value when the key is not found. New From 1.2.6.7 |
not_found_message |
the string to print when the key is not found |
This class is a boolean value with a reason
parameters |
explanation |
value |
True or False |
reason |
the reason why the boolean value is given |
This class is the abstract class of the types (atom types, bonded force types and so on).
parameters |
explanation |
name |
the name of the type |
kwargs |
parameters of the type |
This function is used to add a property to the class
parameters |
explanation |
parm_fmt |
a dict mapping the name and the format of the property |
parm_default |
a dict mapping the name and the default value of the property |
This function is used to set the unit of the property of the class
parameters |
explanation |
prop |
the name of the property |
unit_type |
the type of the unit |
base_unit |
the basic unit used in Python |
This function is used to update the types of the class
parameters |
explanation |
string |
the string to update |
skip_lines |
skip the first skip_lines line(s) |
This function is used to update the types of the class
parameters |
explanation |
filename |
the name of the file |
skip_lines |
skip the first skip_lines line(s) |
This function is used to update the types of the class
parameters |
explanation |
dic |
the dict of the parameters |
This function gives the ._name of the class
return |
the name of the class |
This function clears the instance(s) of the class
parameters |
explanation |
name |
the instance name to clear. If None, all instances will be cleared |
This function sets the instance into the class
parameters |
explanation |
name |
the instance name |
toset |
the instance to set |
This function gets the instance of the class
parameters |
explanation |
name |
the instance name |
return |
the instance to set |
This function gets the all instances of the class
return |
a dict mapping the name and the instance |
This function is used to update the properties of the instance
parameters |
explanation |
kwargs |
parameters to update |
This abstract class is used to judge whether a class can be treated as a molecule
This class is a subclass of Type, for atom types
parameters |
explanation |
name |
the name of the type |
kwargs |
parameters of the type |
This class is a subclass of Type, for residue types
parameters |
explanation |
name |
the name of the type |
kwargs |
parameters of the type |
the name of the first atom in the head
the name of the first atom in the tail
the name of the second atom in the head
the name of the second atom in the tail
the length of the bond connected to the last residue
the length of the bond connected to the next residue
the link conditions to the last residue
the link conditions to the next residue
This function convert an atom name to an Atom instance
parameters |
explanation |
name |
the name |
This function convert an Atom instance to its index
parameters |
explanation |
atom |
the Atom instance |
This function convert an Atom instance to its name
parameters |
explanation |
atom |
the Atom instance |
This function convert an atom name to its index
parameters |
explanation |
name |
the name |
This function is used to add an atom to the residue type.
parameters |
explanation |
name |
the name of the atom |
atom_type |
the type of the atom |
x |
the coordinate x |
y |
the coordinate y |
z |
the coordinate z |
This function omits some atoms from the ResidueType
parameters |
explanation |
atoms |
the atom(s) to omit |
charge |
the total charge of the residue type after the omission. None to use the charge sum of the unomitted atoms |
This function is used to add the connectivity between two atoms to the residue type.
parameters |
explanation |
atom0 |
the atom name or the Atom instance |
atom1 |
the atom name or the Atom instance |
This function is used to remove the connectivity between two atoms from the residue type.
parameters |
explanation |
atom0 |
the atom name or the Atom instance |
atom1 |
the atom name or the Atom instance |
This function is used to remove the connectivity between atoms larger than the given cutoff
parameters |
explanation |
cutoff |
the cutoff distance to recognize the connectivity as periodic or unperiodic |
return |
a list of the removed connected atom pair names |
This function is used to add the bonded force to the residue type.
parameters |
explanation |
bonded_force_entity |
the bonded force instance |
typename |
the bonded force type name. If None, get_class_name will be used to get the name |
This function is used to deep copy the instance
parameters |
explanation |
name |
the new ResidueType name |
forcopy |
the key to help you find who it is from |
This class is the abstract class of the entities (atoms, bonded forces, residues and so on).
parameters |
explanation |
entity_type |
the type of the entity |
name |
the name of the entity |
This function gives the name of the class
return |
the name of the class |
This function is used to update the properties of the instance
parameters |
explanation |
kwargs |
the properties to update |
This class is a subclass of Entity, for atoms
parameters |
explanation |
entity_type |
a string or a AtomType instance, the type of the entity |
name |
the name of the entity |
the extra excluded atoms of this atom
This function is used to deep copy the instance
parameters |
explanation |
forcopy |
the key to help you find who it is from |
This function is used to link atoms for building
parameters |
explanation |
link_type |
the type to link |
atom |
the atom to link |
This function is used to extra exclude one atom
parameters |
explanation |
atom |
an Atom instance |
This function is used to extra exclude a list of atoms
parameters |
explanation |
atom_list |
the atom list |
This class is a subclass of Entity, for residues
parameters |
explanation |
entity_type |
a string or a ResidueType instance, the type of the entity |
name |
the name of the entity |
directly_copy |
if True, directly copy the Residue instance from the ResidueType instance |
This function is used to change the type of the residue to a new type
parameters |
explanation |
new_type |
the instance or the name of the new residue type |
add_missing_atoms |
whether to add missing atoms after deleting the terminal atoms |
This function is used to turn the terminal residue to be unterminal
parameters |
explanation |
add_missing_atoms |
whether to add missing atoms after deleting the terminal atoms |
return |
1 for success, 0 for failure |
This function convert an atom name to an Atom instance
parameters |
explanation |
name |
the name |
This function convert an Atom instance to its index
parameters |
explanation |
atom |
the Atom instance |
This function convert an atom name to its index
parameters |
explanation |
name |
the name |
This function is used to add an atom to the residue
parameters |
explanation |
name |
the name of the atom. If an Atom instance is given, only the name and type are used. |
atom_type |
the type of the atom. If None, it will copy from the ResidueType. |
x |
the coordinate x. If None, it will copy from the ResidueType. |
y |
the coordinate y. If None, it will copy from the ResidueType. |
z |
the coordinate z. If None, it will copy from the ResidueType. |
This function is used to add the connectivity between two atoms to the residue entity.
parameters |
explanation |
atom0 |
the atom name or the Atom instance |
atom1 |
the atom name or the Atom instance |
This function is used to add the bonded force to the residue entity.
parameters |
explanation |
bonded_force_entity |
the bonded force instance |
This function is used to add the missing atoms from the ResidueType to the residue entity.
This function is used to deep copy the instance
parameters |
explanation |
forcopy |
the key to help you find who it is from |
This class is a class for the link between residues
parameters |
explanation |
atom1 |
the first atom to link |
atom2 |
the second atom to link |
This function is used to get the hash value of the ResidueLink
parameters |
explanation |
one |
one Atom or Residue of the link |
other |
the other Atom or Residue of the link |
This function is used to add the bonded force to the residue link
parameters |
explanation |
bonded_force_entity |
the bonded force instance |
This function is used to deep copy the instance
parameters |
explanation |
forcopy |
the key to help you find who it is from |
This class is a class for molecules
parameters |
explanation |
name |
a string, the name of the Molecule or a ResidueType instance |
This function casts a Residue, a ResidueType or a Molecule to a Molecule
parameters |
explanation |
other |
a Residue, a ResidueType or a Molecule instance |
deepcopy |
whether to deepcopy the other instance |
return |
a Molecule instance |
This function is used to set the function when Save_SPONGE_Input
.
parameters |
explanation |
keyname |
the file prefix to save |
This function is used to delete the function when Save_SPONGE_Input
.
parameters |
explanation |
keyname |
the file prefix to save |
This function is used to set the function when Save_SPONGE_Input
.
parameters |
explanation |
keyname |
the file prefix to save |
This function is used to delete the function when Save_SPONGE_Input
.
parameters |
explanation |
keyname |
the file prefix to save |
This function is used to find the most spacious (lowest atom density) direction of the givin point around the atom positions
parameters |
explanation |
point |
a list of 3 numbers, the point to find the most spacious direction |
atom_positions |
the atom positions around the point. If None, this will use the positions of the atoms in this Molecule |
return |
a numpy array with the shape (3,), the most spacious direction |
This function is used to add a residue to the molecule
parameters |
explanation |
residue |
the residue to add, either a Residue instance or a ResidueType instance |
This function is used to add the bonded force to the residue type.
parameters |
explanation |
bonded_force_entity |
the bonded force instance |
This function is used to add the connectivity between two atoms of two residues in the molecule.
parameters |
explanation |
atom1 |
the first atom |
atom2 |
the second atom |
This function is used to get the ResidueLink between two residues
parameters |
explanation |
one |
one Atom or Residue of the ResidueLink |
other |
the other Atom or Residue of the ResidueLink |
return |
the ResidueLink or None if not found |
This function is used to delete the ResidueLink between two residues
parameters |
explanation |
one |
one Atom or Residue of the ResidueLink |
other |
the other Atom or Residue of the ResidueLink |
key |
"atom" or "residue", to specify the key |
This function is used to add the missing atoms from the ResidueType instances to the molecule.
This function is used to set the information about the missing residues
parameters |
explanation |
start |
the residue or the residue index where the missing residues start. None for no starting residue. |
end |
the residue or the residue index where the missing residues end. None for no ending residue. |
missing_residues |
the missing residues. The parameter can be a string separated by space, or a list of residue names, or a list of ResidueType or None. If None, the information will be deleted between start and end |
return |
True for success, False for failure to set |
This function is used to clear the information about the missing residues
This function is used to add the missing residues according to the information of the missing residues.
parameters |
explanation |
add_head |
whether to add the missing residues at the head of the chain |
add_tail |
whether to add the missing residues at the tail of the chain |
This function is used to deep copy the instance
This function is used to get the atoms in the molecule.
This function is used to get the atom coordinates
return |
a numpy array, the coordinates of atoms |
This function is used to divide the molecule into two parts
parameters |
explanation |
atom1 |
the first atom |
atom2 |
the second atom |
return |
two numpy arrays, the index of the two parts |
This function is used to generate the atoms for restraints
parameters |
explanation |
select |
a string of MDAnalysis selection |
filename |
the name of the output atom index file |
This function is used to generate the mass in file for constraints
parameters |
explanation |
select |
a string of MDAnalysis selection |
filename |
the name of the output atom index file |
This class is a subclass of Entity, for bonded forces
This function is used to deep copy the instance
This class is a subclass of Type, for bonded force types
This function receives a list of atoms and output all the same force permutations for the list
parameters |
explanation |
atom_list |
|
This class is a subclass of Type, for pairwise force types