⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pocket.h

📁 药物开发中的基于结构的从头设计代码
💻 H
字号:
# include <stdio.h>
# include <string.h>
# include <stdlib.h>
# include <math.h>
# include <time.h>
# define TRUE 1
# define FALSE 0
# define DIST_CUTOFF 5.00
# define HB_D_R 1.86
# define HB_A_R 1.67 
# define HYDROPHOBIC_R 1.94
# define HB_ANGLE_CUTOFF 90.0
# define VB  -0.168
# define SHB  0.593
# define MHB  0.216
# define WHB  0.141
# define SWH  0.291
# define MWH -0.708
# define WWH  0.327
# define MB   0.916
# define HM   0.473
# define SB_AWARD 0.150

class Parameter
	{
	 public:
		 char pdb_file[160];
		 char lig_file[160];
		 char parameter_dir[160];
		 char pocket_file[160];
		 char grid_file[160];
		 char interact_file[160];
		 char pharmacophore_txt[160];
		 char pharmacophore_pdb[160];

		 float min_feature_distance;
		 int max_feature_number;

		 Parameter();
		 ~Parameter();

		 void Read_Index(char *filename);
		 void Show_Content() const;
	};

class Protein
        {
         private:
                 int num_res;	// No. of residues in the RESIDUE file
                 struct Residue
                        {
                         char name[4];
                         int num_atom;
                         struct
                                {
                                 char name[6];
                                 char type[8];
                                 float r;
                                 float q;
                                 float logp;
                                 char hb[3];
                                } atom[50];
                        }; 

		 Residue *res;

         public:
                 int num_atom;	// No. of atoms in the PDB file
                 struct Patom
                        {
                         int atom_id;
                         int valid;
                         char name[6];
                         char residue[4];
                         char res_id[5];
                         char chain;
                         char type[8];
                         float coor[3];
                         float root[3];
                         float r;
                         float q;
                         float logp;
                         char hb[3];
                        };

		 Patom *atom;

		 int num_pocket_res;	// No. of pocket residues 
		 struct Pocket_res
			{
			 int valid;
			 char name[4];
			 char id[5];
			 char chain;
			};

		 Pocket_res *pocket_res;
			
                 Protein();
		 ~Protein();

		 void Read_RESIDUE(char *dirname);
		 void Show_RESIDUE() const;
                 void Read_PDB(char *filename);
		 void Show_PDB() const;
                 void Value_Atom();
                 void Check_Water();
                 void Cal_HB_Root();
                 void Check_Metal();
		 void Show_Atom() const;
		 void Find_Pocket_Atom();
		 void Show_Pocket_Residue() const;
		 void Output_Pocket_Atom(char *filename) const;
	};

class Ligand
        {
         public:
                int num_atom;
		struct Latom
			{
			 int id;
			 char name[8];
			 char type[10];
			 float coor[3];
			 float r;
			 int valid;
			}; 
	
		Latom *atom;

                Ligand();  
		~Ligand();

                void Read_From_Mol2(char *filename);
		void Show_Content() const;
        };

class Pocket 
	{
	 private:
		 int max_x, min_x;	// binding pocket boundary
		 int max_y, min_y;	// binding pocket boundary
		 int max_z, min_z;	// binding pocket boundary

		 int num_grid;
		 struct Grid
                	{
                 	 char type;
                 	 float coor[3];
                 	 float donor_score;
                 	 float acceptor_score;
                 	 float hydrophobic_score;
		 	 int patom_neib;
		 	 int homo_neib;
		 	 int hetero_neib;
		 	 int valid;
		 	 float score;
                	};

		 Grid *grid;

		 int num_feature;
		 struct Feature
			{
		 	 int valid;
		 	 char type;
		 	 float coor[3];
		 	 int neib;
		 	 float score;
			};

		 Feature *feature;
		 
	 public:
		 Pocket();
		 ~Pocket();

		 void Define_Box();
		 void Make_Grid();
		 void Filter_Grid();
		 void Refine_Grid();
		 void Test_Phase(char *filename) const;
		 void Count_Grid_Neighbor(Grid &point, float r);
		 void Output_Grid(char *filename) const; 
		 void Output_Key_Site(char *filename) const;
		 void Deduce_Pharmacophore(float min_d, int max_num);
		 void Count_Feature_Score(Feature &point, float r);
		 void Output_Pharmacophore_PDB(char *filename) const;
		 void Output_Pharmacophore_TXT(char *filename) const;
	};

// misc.c
float Distance(float a[3], float b[3]);
float Distance2(float a[3], float b[3]);
void Translate_Point(float start[3], float move[3], float end[3]);
void Rotate_Point(float theta, float axis[3], float origin[3],
                  float start[3], float end[3]);
void Cross_Multiply(float v1[3], float v2[3], float result[3]);
float Point_Multiply(float v1[3], float v2[3]);
float Angle_Of_Two_Vectors(float v1[3], float v2[3]);
float Torsion_Angle(float p1[3], float p2[3], float p3[3], float p4[3]);
void Unify_Vector(float vect[3]);
void Get_Sp3_Coordinates(float v1[3], float v2[3], float v3[3], float v4[3]);
void Get_Sp2_Coordinates(float v1[3], float v2[3], float v3[3]);
void Set_Random_Number();
char *Get_Time();
int Pow(int x, int y);
int Blank_Line_Check(char *line);
void Memory_Allocation_Error();
void Openning_File_Error(char *filename);
void Reading_File_Error(char *filename);
void PDB_Format_Error(char *filename);
void Mol2_Format_Error(char *filename);
void Lig_Format_Error(char *filename);
void Missing_Parameter_Error(char *name);
void Invalid_Parameter_Error(char *name);
void Check_Directory(char *name);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -