3. AnalysisActor¶
-
class
MDSimsEval.AnalysisActorClass.
AnalysisActor
(topology, trajectory, drug_name, sasa_file='', salts_directory='')¶ The AnalysisActor is the core object which inputs a single topology and trajectory and performs the analysis.
The class will be responsible for reading, running calculations and storing the results. The role of the class is mainly “structural” since it is the base input of all of our analysis functions. In the future a caching mechanism should be added so as to not have to perform multiple times the same calculations and instead read them from disk.
Note
Solvent Accessible Surface Area (SASA) and Salt bridges are calculated outside of the package. More info on SASA and Salt Bridges.
Example
Example on calculating RMSF and PCA on the whole
analysis_actors_dict
from MDSimsEval.utils import create_analysis_actor_dict analysis_actors_dict = create_analysis_actor_dict('path_to_data_directory/') for ligand in analysis_actors_dict['Agonists'] + analysis_actors_dict['Antagonists']: ligand.perform_analysis(metrics=["RMSF", "PCA"])
- Parameters
topology (str) – The topology filepath (.pdb, .gro etc)
trajectory (str) – The trajectory filepath (.xtc etc)
drug_name (str) – The name of the agonist or antagonist
sasa_file (str, optional) – Full path of the sasa.xvg file generated by Gromacs
salts_directory (str, optional) – Full path of the salts directory generated by the vmd extension
-
uni
¶ The universe of atoms created by MDAnalysis tool (MDAnalysis.core.universe)
-
mdtraj
¶ The trajectory of atoms created by MDTraj tool (mdtraj.Trajectory)
-
drug_name
¶ The ligand name initialized in the construction of the object
- Type
str
-
rg_res
¶ Radius of gyration of each frame (MDAnalysisRg)
- Type
list
of double
-
rmsf_res
¶ RMSF of each atom of the protein (MDAnalysisRMSF)
- Type
list
of double
-
pca_res
¶ Object containing eigenvectors and eigenvalues of CA atoms covariance matrix (MDAnalysis.analysis.pca.PCA)
-
pca_xyz
¶ The coordinates of the atoms selected for PCA
- Type
ndarray[#atoms_selected * 3, #frames]
-
sasa_res
¶ The calculation currently is performed outside of the pipeline using gromacs.
- Type
ndarray[2, #frames]
-
hbonds
¶ A list containing the atom indices involved in each of the identified hydrogen bonds at each frame. Each element in the list is an array where each row contains three integer indices, (d_i, h_i, a_i), such that d_i is the index of the donor atom, h_i the index of the hydrogen atom, and a_i the index of the acceptor atom involved in a hydrogen bond which occurs in that frame. (MDtraj)
- Type
ndarray[#frames, #hbonds_of_frame, 3]
-
salt_bridges_df
¶ A pd.DataFrame with the first two columns [“Residue1”, “Residue2”] being the residue names that form the salt bridge and the next #frames column the distance between these two residues (VMD plugin)
- Type
pd.DataFrame[#NumberOfSaltBridges, 2 + DistancesPerFrame]
-
salt_bridges_over_time
¶ A vector of size #frames containing the number of active salt bridges per frame
- Type
ndarray[#frames]
-
get_frames_number
()¶ Returns the number of frames of the trajectory
-
info
()¶ Prints basic info of the simulation
-
perform_analysis
(metrics=())¶ Runs the analysis methods for calculating the metrics specified by metrics argument
- Parameters
metrics (List[str]) –
A list of the metrics to be calculated. Available:Empty List []: All of the available metrics will be calculated (default)’Rg’: Radius of Gyration’RMSF’: Root Mean Square Fluctuations’SASA’: Solvent Accessible Surface Area’PCA’: Principal Component Analysis’Hbonds’: Hydrogen Bonds’Salt’: Calculate number of salt bridges