Tools for Dummy Atoms Model manipulation
| Return invariants: | |
|---|---|
| 3-tuple containing (fineness, Rg, Dmax) | |
Save the 6 canonical parameters of the initial molecule: x0, y0, z0, the position of the center of mass phi, theta, psi, the three Euler angles of the canonical rotation (axis:x,y’,z’‘)
Calculate the rotation matrix to align inertia momentum of the molecule on principal axis.
| Return rot: | rotation matrix det==1 |
|---|
Calculate the translation matrix to translate the center of mass of the molecule on the origin of the base.
| Return trans: | translation matrix |
|---|
Calculate the position of the center of mass of the molecule.
| Return self.com: | |
|---|---|
| 1d array, coordinates of the center of mass of the molecule | |
Calculate the distance with another model.
| Parameters: |
|
|---|---|
| Return D: | NSD between the 2 molecules, in their position molecule1 and molecule2 |
The first molecule, molref, is put on its canonical position. The second one, mol2, is moved following the transformation selected
| Parameters: |
|
|---|---|
| Return distance: | |
the NSD between the first molecule and the second one after its movement |
|
calculate the inertia tensor of the protein
| Return self.inertensor: | |
|---|---|
| inertia tensor of the molecule | |
Read the PDB file, extract coordinates of each dummy atom, extract the R-factor of the model, coordinates of each dummy atom and pdb file header.
| Parameters: | filename – name of the pdb file to read |
|---|
Save the position of each dummy atom in a PDB file.
| Parameters: | filename – name of the pdb file to write |
|---|
Calculate the new coordinates of each dummy atoms of the molecule after a transformation defined by six parameters and a symmetry
| Parameters: |
|
|---|---|
| Return mol: | 2d array, coordinates after transformation |
Create a 2d array with the difference vec1[i]-vec2[j]
| Parameters: | vec2 (vec1,) – 1d-array |
|---|---|
| Return v1 - v2: | difference for any element of v1 and v2 (i.e a 2D array) |
Used to align DAM from pdb files
Align two models using the first one as reference. The aligned models are save in pdb files.
| Return dist: | NSD after alignment |
|---|
Align all models in self.models with the reference one. The aligned models are saved in pdb files (names in list self.outputfiles)
Apply 8 combinations to the molecule and select the one which minimize the distance between it and the reference.
| Parameters: |
|
|---|---|
| Return combinaison: | |
best symmetry to minimize NSD |
|
| Return p: | transformation parameters optimized if slow is true, unoptimized else |
Create SASModels from pdb files saved in self.inputfiles and saved them in self.models. Center of mass, inertia tensor and canonical parameters are computed for each SASModel.
| Return self.models: | |
|---|---|
| list of SASModel | |
Find the reference model among the models aligned. The reference model is the one with lower average NSD with other models.
| Return ref_number: | |
|---|---|
| position of the reference model in the list self.models | |
Calculate the NSD correlation table and save it in self.arrayNSD
| Return self.arrayNSD: | |
|---|---|
| 2d array, NSD correlation table | |
Use scipy.optimize to optimize transformation parameters to minimize NSD
| Parameters: |
|
|---|---|
| Return p: | transformation parameters optimized |
| Return dist: | NSD after optimization |
Create a png file with the table of NSD and the average NSD for each model. A threshold is computed to segregate good models and the ones to exclude.
| Parameters: |
|
|---|---|
| Return fig: | the wanted figures |
Create SASModels from pdb files saved in self.inputfiles and saved them in self.models. Center of mass, inertia tensor and canonical parameters are computed for each SASModel.
| Parameters: | molecule – optional 2d array, coordinates of the atoms for the model to create |
|---|---|
| Return self.models: | |
| list of SASModel | |
Check if each model respect the limit for the R-factor
| Return self.validmodels: | |
|---|---|
| 1d array, 0 for a non valid model, else 1 | |
Calculation the maximal value for the R-factors, which is the mean of all the R-factors of inputs plus 2 times the standard deviation. R-factors are saved in the attribute self.rfactors, 1d array, and in percentage.
| Return rmax: | maximal value for the R-factor |
|---|
Create a png file with the table of R factor for each model. A threshold is computed to discarded models with Rfactor>Rmax.
| Parameters: |
|
|---|---|
| Return fig: | the wanted figures |