libmove3d
3.13.0
|
00001 // Description: 00002 // This file contains constant and variable definitions that are used within the BioEnergy module and is intended 00003 // and a link between the interface and the actual computing code 00004 00005 #ifndef BIOENERGY_COMMON_H 00006 #define BIOENERGY_COMMON_H 00007 00008 #include "P3d-pkg.h" 00009 00010 #include <basics.h> 00011 #include <stringExtra.h> 00012 00013 #define NB_OF_CHAR 300 00014 #define NB_OF_LIB 4 00015 #define NB_MAXCYC 100 00016 00017 00018 #define TOTAL_NO_EIGENVECTORS 56 //This is the number of eigenvectors calculated. 00019 // For the moment this 56 value is hard-coded 00020 #define NO_OF_COLLECTIVE_DEGREES 56 //This is the number of eigenvectors to be used, out of the TOTAL_NO_EIGENVECTORS available 00021 00022 static const int NB_OF_ENERGY_TERMS = 51; //This constant comes from "mini.f", variable "ene" of function "fortrancodeenergyminimisation" 00023 00024 00025 /* for normal modes and torsion values calculations */ 00026 typedef struct s_displacement{ 00027 int nbOfAtoms; 00028 int nbOfEigenVec; 00029 struct s_coord ***cooPtPtPt; 00030 }displacement; 00031 00032 typedef struct s_vector{ 00033 int nbOfAtoms; 00034 struct s_coord **pos; 00035 }vector; 00036 00037 typedef struct s_torsion{ 00038 int **nPtPt; 00039 int njoint; 00040 }torsion; 00041 00042 typedef struct s_coord { 00043 double x, y, z; 00044 } coord; 00045 00046 00047 //The interface will allow the user to select on of these functioning modes: 00048 // a) With a protein and no ligand, b) with a P and a non-protein ligend and c) with a P and L as protein 00049 typedef enum { 00050 ligtypeNONE, ligtypeNON_PROTEIN, ligtypePROTEIN 00051 } ligandType; 00052 00053 00054 00055 00056 /* to take the data from p3d structures */ 00057 void GetAtomsPositionsFromLinearVectorToNx3matrix(double *coo_x, int natom, vector *vec); 00058 void get_displacement(double *vec_x, int nvec, int natom, displacement *dis); 00059 00060 /* to calculate the torsions values */ 00061 void GetTorsionAnglesFromCartesianCoordinates ( vector *vec, torsion *tor, double *value); 00062 void get_collective_degrees (displacement * dis, vector *vec, torsion *tor, double **col_d); 00063 00064 00065 void GetAtomNumbersForDihedralsOfEachJoint (p3d_rob *mol, torsion *torPt, int firstJoint, int lastJoint ); 00066 00067 00068 int GetTotalNumberOfJoints(); 00069 int ComputeTotalNumberOfAtoms(); 00070 int GetFirstAndLastJointOfMainProteinAndLigand( int *firstJointProtein, int *lastJointProtein, int *firstJointLigand, int *lastJointProteinLigand ); 00071 void GetFirstAndLastJointOfLigand( int *firstJoint, int *lastJoint); 00072 void GetFirstAndLastJointOfMainProtein( int *firstJoint, int *lastJoint); 00073 int ComputeNumberOfAtomsOfMainProtein(); 00074 int ComputeNumberOfAtomsOfLigand(); 00075 00076 00077 00078 //Methods that are available to the interface 00079 void SetCurrentLigandType( ligandType newLigandType ); 00080 ligandType GetCurrentLigandType(); 00081 00082 void SetCurrentFilesForProteinAndLigand( char* proteinFileName, char* ligandFileName ); 00083 //Warning. The method below returns copies. The memory is allocated with malloc so it shour be freed 00084 void GetCurrentFilesForProteinAndLigand( char** proteinFileName, char** ligandFileName ); 00085 char *GetProteinPDBFile(); 00086 char *GetLigandPDBFile(); 00087 00088 void get_torsions (p3d_rob *mol, torsion *torPt); 00089 00090 //File name manipulation 00091 void GetFileNameWithPathWithoutExtension( char *fullFileName, char **outFileName ); 00092 00093 00094 00095 #endif /* #ifndef BIOENERGY_COMMON_H */