?? link.h
字號:
# include <stdio.h>
# include <string.h>
# include <stdlib.h>
# include <math.h>
# include <time.h>
# define TRUE 1
# define FALSE 0
# define VDW_1_4_FACTOR 0.50
# define VDW_DIST_CUTOFF 8.00
# define VDW_BUMP_RANGE 0.60
# define MINIMA_ENERGY_CUTOFF 30.00
# define LINK_ENERGY_CUTOFF 100.00
# define ATOM_OVERLAP_RANGE 0.50
# define ANGLE_OVERLAP_RANGE 30.0
# define LOGP_HYDROPHOBIC_CARBON 0.211
# define LOGP_INTERNAL_HBOND 0.429
# define LOGP_HALOGEN_PAIR 0.137
# define LOGP_NAR_PAIR 0.485
# define LOGP_O3_PAIR -0.268
# define LOGP_ACCEPTOR_PAIR 0.580
# define LOGP_SALICYLIC_ACID 0.554
# define LOGP_AMINO_ACID -2.166
# define HB_ANGLE_CUTOFF 90.0
# define SCORE_VB -0.168
# define SCORE_MB 0.916
# define SCORE_SHB 0.593
# define SCORE_MHB 0.216
# define SCORE_WHB 0.141
# define SCORE_SWH 0.291
# define SCORE_MWH -0.708
# define SCORE_WWH 0.327
# define SCORE_HM 1.178
# define SCORE_RT -0.169
class Atom
{
public:
int id; // ID
int valid; // valid indicator
int part; // component indicator
int num_neib; // number of neighboring atoms
int num_nonh; // number of non-H neighboring atoms
int neib[10]; // ID of neighboring atoms
char name[10]; // name of the atom
char type[10]; // SYBYL atom type
char xtype[20]; // SCORE atom type
float coor[3]; // coordinates
float root[3]; // h-bond roots' coordinates
float r; // vdw radius
float eps; // vdw epsilon value
int weight; // atomic weight
float R; // SCORE radius
float logp; // atomic hydrophobic scale
char hb[3]; // h-bond property
float score; // atomic binding score
int ring; // ring indicator
Atom(); // constructor
~Atom(); // deconstructor
void Show_Content() const;
};
class Bond
{
public:
int id;
int valid; // valid indicator
int atom_1; // ID of the atom_1
int atom_2; // ID of the atom_2
char type[3]; // bond type
int part; // ID of the component
int ring; // ring indicator
float length; // bond length
int num_neib; // number of neighboring bonds
int neib[10]; // ID of neighboring bonds
Bond(); // constructor
~Bond(); // deconstructor
void Show_Content() const;
};
class Torsion
{
public:
Atom atom_1;
Atom atom_2;
Atom atom_3;
Atom atom_4;
char type[3]; // type of the torsion between 2-3
int angle; // torsion angle, in degree
float V; // potential barrier
int n; // periodicity
int S; // sign
float e; // torsion energy
Torsion(); // constructor
~Torsion(); // deconstructor
void Show_Content() const;
};
class Group
{
public:
int valid;
int num_neib; // number of neighboring atoms
int num_nonh; // number of neighboring non-h atoms
int num_h; // number of neighboring hydrogen atoms
int num_hetero; // number of neighboring heteroatoms
int num_pi; // number of neighboring pi atoms
int num_car; // number of neighboring c.ar
int num_nar; // number of neighboring n.ar
int db_type; // double bond type
Atom center; // center atom of the group
Atom neib[10]; // neighboring atoms
Bond bond[10]; // bonds
Group(); // constructor
~Group(); // deconstructor
void Show_Content() const;
};
class Parameter // diff
{
public:
char seed_file[160];
char parameter_dir[160];
char fraglib_dir[160];
char forbidlib_dir[160];
char toxiclib_dir[160];
char pocket_file[160];
char grid_file[160];
float grow_ratio;
float link_ratio;
float mutate_ratio;
char apply_chemical_rules[10];
char apply_forbidden_check[10];
char apply_toxicity_check[10];
int max_weight;
int min_weight;
float max_logp;
float min_logp;
int max_donor;
int min_donor;
int max_acceptor;
int min_acceptor;
float max_pkd;
float min_pkd;
// GA parameters
int ga_starting_mode;
int num_generation;
int max_population;
char population_file[160];
char ligands_file[160];
Parameter(char *filename);
~Parameter();
void Read_Index(char *filename);
void Detect_GA_Start(char *filename);
void Check_Output();
void Show_Content() const;
};
class Pocket
{
private:
int num_grid;
char *grid;
public:
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_atom;
Atom *atom;
Pocket(); // constructor
~Pocket(); // deconstructor
void Show_Content() const;
void Read_Grids(char *filename);
void Read_Atoms(char *filename);
char Get_Grid_Property(float coor[3]) const;
};
class ForceField
{
private:
int num_atomtype;
struct ATOM_DEF
{
char type[10];
float r;
float eps;
int weight;
};
ATOM_DEF *atom;
int num_bondtype;
struct BOND_DEF
{
char atom_1[10];
char atom_2[10];
char type[3];
float length;
};
BOND_DEF *bond;
int num_torstype;
struct TORS_DEF
{
char atom_1[10];
char atom_2[10];
char atom_3[10];
char atom_4[10];
char type[3];
float V; // twisting force constant
int n; // periodicity
int S; // sign of torsion angle type
};
TORS_DEF *torsion;
int num_xatomtype;
struct XATOM_DEF
{
char type[20];
float R;
int weight;
char hb[3];
float logp;
};
XATOM_DEF *xatom;
public:
ForceField(char *dirname); // constructor
~ForceField(); // deconstructor
void Show_Content() const;
void Read_ATOM_DEF(char *filename);
void Read_BOND_DEF(char *filename);
void Read_TORSION_DEF(char *filename);
void Read_XATOM_DEF(char *filename);
void Assign_Atom_Parameters(Atom &atm) const;
void Assign_Atom_Xparameters(Atom &atm) const;
float Get_Bond_Length(char *a1,char *a2,char *bond_type) const;
void Assign_Torsion_Parameters(Torsion &tors) const;
float Cal_Torsion_Energy(Torsion tors) const;
float Cal_VDW_Energy(Atom a1,Atom a2,int mark_1_4=FALSE) const;
};
class Ligand
{
public:
int id;
float possibility; // for building blocks
int valid;
char name[80];
int weight;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -