/* EGAD: EXTERN_LIST Navin Pokala and Tracy Handel Dept. of Molecular and Cell Biology University of California, Berkeley Copyright (C) 2003 Regents of the University of California GNU Public License Aug 12 2003 Absolutely no warranties are made or are implied with the use of this program or its parts. List of extern variables and constants used in EGAD. */ Constants (#define) declared in structure_types.h. Variables listed here are clustered with related ones. This is not a complete list /*********************************************************************************************************/ #define ENDFLAG -10 /* used as an array ending value for many structures */ /********************** max values for some arrays *************************************************/ #define MAXLINE 150 /* max string length */ #define MXLINE_INPUT 1000 /* max string length for strings that may have long paths */ extern int MAX_ATOMS; /* max size of an array of atoms; defined based on the inputed Template pdb */ /* defined in input_stuff.cpp: input_stuff and readpdbfile.cpp: readpdbfile */ extern int MAX_RESIDUE /* max number of residues; defined by the the size of the inputed Template pdb */ /* defined in input_stuff.cpp: input_stuff and readpdbfile.cpp: readpdbfile */ extern int MAX_SEQ_POSITION; /* defined in readpdbfile.cpp: readpdbfile; largest internally used seq_position */ #define MAX_PROT_RES_SIZE 24 /* max size for natural protein residues */ extern int MAX_RES_SIZE; /* max residue size; defined based on inputted resparam and ligand files in read_residuedata */ extern int MAX_ROTAMERS /* max number of rotamers per sidechain; defined by the rotamerlib file in read_rotamers */ extern int MAX_RESIMERS; /* max resimers at a position; defined by the rotamerlib file in read_forcefield.cpp: read_rotamers */ #define MAX_CHAINS 40 /* max number of chains */ #define MAX_RES_CHOICES 40 /* max number of residue/ligand choices at a given position */ #define MAXRESTYPES 80 /* max number of residue/ligand types */ #define MAXATOMTYPES 80 /* max number of atom types */ extern int MAX_LIGAND; /* max number of freely moving ligands */ #define MAX_TORSION_PARAMS 500 /* max number of angle-dependent torsion parameters */ #define MAX_NUM_METHYL 5 /* max number of rotatable methyl groups for local minimization of vdw energies */ /************************* math-related constants **************************************************/ #define PI M_PI #define LN10 M_LN10 #define PI_4 12.56637061 #define PI_2 6.283185307 #define PI_8 25.13274123 #define PI_over2 1.570796327 #define PI_over3 1.047197551 #define PI_3 9.424777961 #define PI_77_sqrt2 342.1019862 #define PI_1_5_power_1024 5701.967869 #define PI_under100 31.83098862 #define PI_over180 0.017453293 #define PI_under180 57.29578 #define PI_PLUS_LN10_PLUS_SQRT2_MINUS_E_1e5 414010.948 #define EPS 1.0e-6 #define TOL 1.0e-4 #define TINY 1.0e-10 #define TRUE 1 /* Useful Boolean definitions */ #define FALSE 0 extern long IDUM; /* for numerical recipies random number generator */ /********************************* forcefield and energy function variables *******************************/ #define FORCEFIELD_DISTANCE_CUTOFF 10 /* max distance for an interaction */ #define FORCEFIELD_DISTANCE_CUTOFF_SQRD 100 /* FORCEFIELD_DISTANCE_CUTOFF^2 */ extern double NONBOND_FACTOR_1_4; /* scale factor for vdw/coulomb for 1,4 interactions; 1/2 for OPLS-AA */ #define MAX_DISULFIDE_BOND_LENGTH 2.5 #define MAX_DISULFIDE_BOND_LENGTH_SQRD 6.25 extern int INTRA_ROTAMER_FLAG, INTRA_ROTAMER_FLAG_14; /* if 1 (default) calculate sidechain internal energies */ /*********** coulombic electrostatics constants ************/ extern double **CHARGE_PRODUCT; /* table of all possible inter-atomic charge products */ /* indexed by atomparam.charge_class */ /* created by read_forcefield.cpp: calculate_charge_products */ extern double COULOMB_CONST_OVER_INTERNAL_DIELECTRIC; /* COULOMB_CONST/INTERNAL_DIELECTRIC for couloumbic electrostatics */ extern double INTERNAL_DIELECTRIC; #define COULOMB_CONST 332.0636 /* (e^2)/(4*pi*epsilon0) in kcal/mol */ #define HALF_COULOMB_CONST 166.0318 #define COULOMBIC_ATTRACTION_CAP -0.3 /* cap favorable columbic energies; prevent artefacts that result in electrostatics overtaking repulsive vdw for overlapped atoms */ /**************** Born energy constants **************/ extern double INTERNAL_DIELECTRIC; extern double ONE_OVER_INTERNAL_DIELECTRIC; extern double WATER_DIELECTRIC; extern double ONE_OVER_WATER_DIELECTRIC; extern double BORN_TAU; /* constant for Born calcs; ONE_OVER_WATER_DIELECTRIC - ONE_OVER_INTERNAL_DIELECTRIC */ extern double COUL_CONST_BORN_TAU; /* BORN_TAU*COULOMB_CONST ; for Born calcs */ extern double HALF_COUL_CONST_BORN_TAU; /* for Born self energies */ #define DEBYE_CONST 35.741508 extern double KAPPA; /* debye-huckel constant for non-zero ionic strength */ #define POL_ATTRACTION_CAP 0.3 /* cap favorable (sign from BORN_TAU<0) born_pol energies; prevent artefacts that result in electrostatics overtaking repulsive vdw for overlapped atoms */ extern double **CHARGE_PRODUCT; /* table of all possible inter-atomic charge products */ /* indexed by atomparam.charge_class */ /* created by read_forcefield.cpp: calculate_charge_products */ /****************** Born radii constants ********************/ extern double BORN_P1; extern double BORN_P2; extern double BORN_P3; extern double BORN_P4; extern double ONE_OVER_BORN_LAMBDA; extern double ONE_OVER_BORN_P5; extern double PI_TIMES_BORN_P5; extern double **UNITED_RADII_SUM_SQUARED; /* used for Born radii calcs; created in read_forcefield */ extern double VAR_FIX_BORN_SCALE; /* used for approximate Born radii calcs */ extern ATOMRESPARAM PSEB; /* pseudoatom sidechain for Born radii precalculations */ /*************** empirical energy-related variables ******************/ /* weights on energy function terms */ extern double WEIGHT_VDW; extern double WEIGHT_ELECTROSTATICS; extern double WEIGHT_1_4; extern double OVERALL_ENERGY_SCALE; /* overall scaling of energy to give agreement w/ experimental ddG */ /************ experimental conditions related variables ***************/ extern double IONIC_STRENGTH; extern double PH; extern double TEMPERATURE; #define R_univ 1.998e-3 /* universal gas constant */ extern double RT; /* R_univ*TEMPERATURE in kcal/mol */ /************* SASA-related constants ******************/ extern CARTESIAN_VECTOR ***VECTOR_PTR; /* holds inter-atomic vectors for SASA calculations that use distances calculated during atompair energy calculations by energy_calc */ /* For functions in which energy_calc will be called many times, this should be allocated and de-allocated by the calling function to prevent overhead */ /* use only if MAX_ATOMS <= REAL_MAX_ATOMS; otherwise, memory problems arise */ #define SASA_SCALE_NUMBER 100 /* SASA scale variable */ #define SASA_MAXPOINTS 256 /* Max number of points on sphere */ #define REAL_MAX_ATOMS 4000 /* max number of atoms that can be used for precalculating CARTESIAN_VECTOR matrix for SASA calc */ #define WATER_RADIUS 1.4 /* radius of water probe for SASA calculations */ extern double SASA_DISTANCE_CUTOFF; extern double **SASA_RADII_SQRD_MATRIX; extern SASA_SUM SASA_SUM_TEMP; /* used to transmit sasa info from energy_calc without passing an additional argument */ extern ATOMRESPARAM PSEUDO_SIDECHAIN_ATOMRESPARAM, /* pseudoatom sidechain for sasa precalculations */ /************ atomic solvation parameters ******************/ extern double HYDROPHOBIC_ASP; extern double GENERAL_ASP; /***************** vdw energy constants ********************/ extern double VDW_CUTOFF; /* vdw energy truncated or reduced above this value; for classic model */ extern double VDW_CUTOFF_LIMIT; /* vdw energy truncated or reduced above this value; for new model */ /* in both and new model, E>VDW_CUTOFF_LIMIT truncated to prevent overflow */ extern double VDW_ATTRACTIVE_FACTOR; /* scale factor on favorable vdw energies; new model */ extern double VDW_REPULSIVE_FACTOR; /* scale factor on ln(unfavorable vdw energies); new model */ /* tables for all possible inter-atomic vdw pair terms; indexed by atom_class; defined in read_forcefield */ extern double **VDW_WELLDEPTH, **VDW_SIGMA6_14, **VDW_WELLDEPTH_14, **VDW_SIGMA6_SCALE; /********** user-defined energy function variables ***********/ /* 1 if used, 0 if not; user-defined in input file some jobtypes have defaults (MINIMIZE has GB_FLAG,SASA_FLAG=0 */ extern int HBOND_FLAG,GB_FLAG,SASA_FLAG,TORSION_FLAG,COULOMB_FLAG; extern int CHARGES_PH_INDEPENDENT_FLAG; /* default 0; if 1, both protonated and deprotonated forms considered explicitly; if 0, atomic charges for ionizable groups are the pH-dependent weighted avg */ /************ variables for residue classification ************/ extern RESPARAM *MEA; /* resparam for MEA pseudosidechain; used for defining core vs surface */ extern double CORESURF_MEA_SASA; /* surface area of MEA pseudosidechain; used for defining core vs surface */ /********************************** parallelization variables *********************************************/ extern char *AVAILABLE_PROCESSORS_FILE; /* name of the file that lists the names of available processors for parallel precalculation of the lookup table */ extern int NICE_SLAVE_FLAG; /* default to 1; if 0, slaves are not nice */ /* defined in inputfile */ extern char *EXECUTABLE_FILENAME; /* the name of the executable; guessed from main or user-defined in the inputfile */ extern char *BATCH_QUEUE_PREFIX; /* prefix for batch queing; used in io.cpp: ssh_command; default in input_stuff */ extern char CURRENT_WORKING_DIRECTORY[]; extern char LOOKUP_TABLE_DIRECTORY[]; /************************************** input function variables ******************************************/ /* permit one to name a resparam or rotamerfile in the inputfile, rather than use the ones defined in the forcefield file */ extern char *RESPARAMFILE; extern char *ROTAMERFILE, extern char **LIGANDFILENAME; /* array of strings; each string is the filename of a ligand definition file */ /************************************** optimization method variables ************************************/ extern double MAX_OPTIMIZATION_TIME; /* max time (in seconds) for an algorithm block; input as RUNTIME (in minutes) in the inputfile */ #define R_initial 1.998 /* gas constant for annealling in optimization methods */ extern double R; /* working gas constant for annealling in optimization methods */ extern int RESTRAIN_MINIMIZATION_FLAG; /* if 1, and if backbone is allowed to move in dihedral minimization, the objective function that is minimized is E_total*rmsd_new_vs_unminimized_bkbn */ /************************************* solubility filter variables *******************************************/ extern int SOLUBILITY_CUTOFF_FLAG; /* default 0; if 1, solubilty used as a design restraint */ extern double OVERALL_CHARGE; /* target overall charge */ extern int CHARGE_EQUALITY_FLAG; /* if OVERALL_CHARGE is defined, this corresponds to >, <, =, abs, etc */ /* see CHROMOSOME_to_lookupEnergy.cpp: is_this_chr_soluble */ extern double OVERALL_CHARGE_TOLERANCE; /* default 0.5 when CHARGE_EQUALITY_FLAG "=" is used as a design constraint */ /* can be user-defined or read from the forcefield file; defaults in parenthesis */ extern double FRACTION_HYDROPHOBIC_SASA_CUTOFF; (0.58) extern double TRANSFER_FREE_ENERGY_DENSITY_CUTOFF; (-0.000982 kcal/mol/A^2) /**************************** I/O related variables ***********************************/ extern int GET_PID; /* process ID for the current process; determined in input_stuff used for marking temp files created by this process */ extern int LOGFILE_FLAG; /* if 1, writes to logfile */ extern int LOGFILE_PERIOD; /* for MC, writes to logfile every LOGFILE_PERIOD cycles */ /********************************* variables for local minimization of vdw energies *******************************/ extern int LOCAL_MINIMIZATION_FLAG; /* default 0; if 1, LOCAL_MINIMIZATION_FLAG used */ extern int MINIMIZE_METHYL_FLAG; /* default 0; if 1, then set LOCAL_MINIMIZATION_FLAG=1 in input_stuff doesn't seem to decrease energy much, so ignored for the most part */ extern int LOTS_OF_ROTAMERLETS_FLAG; /* if 1, spread rotamerlets to chi3; default 0 (only ch1, chi2 rotamerlets) */ extern int **BASE_THREE_CONVERT; /* used for generating rotamerlets for local relaxation of vdw energies */ extern int PAIR_ENERGY_TABLE_FLAG; /* should be deprecated since the ENERGY_PROFILE table is independent of lookup tables */ /* still kept because tables that have local vdw minimization energy are dependent on lookup tables*/ #define ROTAMER_SPREAD_FACTOR 0.5 /* spread = ROTAMER_SPREAD_FACTOR*sigma from rotamerlib file */ #define METHYL_H_SPREAD 5.0 /* degrees to spread methyl H dihedrals */ #define NATURAL_ROTAMER_SPREAD 7.0 /* degrees to spread natural rotamer dihedrals */ /********************************** lookup table special "energy" values ****************************************/ extern float FIXED_POSITION_PTR; /* not really a pointer; a float that gets assigned to var_fix energies of rotamers whose energies have been incorporated into the fixed-atoms energy */ extern float NON_INTERACT_PTR; /* not really a pointer; a float that gets assigned to var_var energies of non-interacting rotamer pairs */ /* used to indicate that no residue pairs at these positions interact */ extern LOOKUP_ENERGY_RESIDUE_X *NON_INTERACT_LOOKUP_RES_X; /* used to indicate that no rotamer pairs for these residues at these positions interact */ extern LOOKUP_ENERGY_ROTAMER_X *NON_INTERACT_LOOKUP_ROT_X; /*********************************** Long path macro shortcuts ************************************************/ #define CHRRES chr->genes->choice_ptr->resparam_ptr #define CHRRESROTj chr->genes->choice_ptr->lookup_res_ptr->lookupRot[j_res_rot] #define CHRROT chr->genes->lookupRot #define ERESROTj lookupEnergy[j].lookupRes[j_res].lookupRot[j_res_rot] #define ERESROT lookupEnergy[i].lookupRes[i_res].lookupRot[i_res_rot] #define ERESROTq lookupEnergy[i].lookupRes[i_res].lookupRot[q_res_rot] #define ERESROT_resimer_j protein->lookupEnergy[j].lookupRes[RESIMER_j_res].lookupRot[RESIMER_j_res_rot] #define ERESROT_resimer protein->lookupEnergy[i].lookupRes[RESIMER_i_res].lookupRot[RESIMER_i_res_rot] #define iRES i_gene->choice_ptr->resparam_ptr #define iRESi_resRESj_res i_gene->choice_ptr->lookup_res_ptr->lookupResResSeq[j-i].lookupResRes[j_res] #define iRESROT i_gene->choice_ptr->lookup_res_ptr->lookupRot[i_res_rot] #define iRESROTJRESROT i_gene->choice_ptr->lookup_res_ptr->lookupRot[i_res_rot].lookupX[j-i].lookupResX[j_res].lookupRotX[j_res_rot] #define iROT i_gene->lookupRot #define iROTjROT i_gene->lookupRot->lookupX[j_minus_i].lookupResX[j_gene->j_choice_index].lookupRotX[j_gene->lookupRot_index-1] #define jRES j_gene->choice_ptr->resparam_ptr #define JRESROT lookupX[j-i].lookupResX[j_res].lookupRotX[j_res_rot] #define jROT j_gene->lookupRot #define RESIMER_i_res protein->var_pos[i].resimer[i_resimer].i_res #define RESIMER_i_res_rot protein->var_pos[i].resimer[i_resimer].i_res_rot #define RESIMER_j_res protein->var_pos[j].resimer[j_resimer].i_res #define RESIMER_j_res_rot protein->var_pos[j].resimer[j_resimer].i_res_rot #define RESROT lookupRes[i_res].lookupRot[i_res_rot] #define VRESROTj varPos[j].choice[j_res].resparam_ptr->rotamerlib_ptr->rotamer[j_res_rot] #define VRESROT varPos[i].choice[i_res].resparam_ptr->rotamerlib_ptr->rotamer[i_res_rot] #define VRES varPos[i].choice[i_res].resparam_ptr /********************************** template structure related variables ******************************/ extern int CTE_FLAG; /* explicitly consider charged C-term; default 0 does not */ extern int NTE_FLAG; /* explicitly consider charged N-term; default 0 does not */ extern int MAX_ATOMS; /* max size of an array of atoms; defined based on the inputed Template pdb */ /* defined in input_stuff.cpp: input_stuff and readpdbfile.cpp: readpdbfile */ extern int MAX_RESIDUE /* max number of residues; defined by the the size of the inputed Template pdb */ /* defined in input_stuff.cpp: input_stuff and readpdbfile.cpp: readpdbfile */ extern int MAX_SEQ_POSITION; /* defined in readpdbfile.cpp: readpdbfile */ /* largest internally used seq_position */ extern int IGNORE_DISULFIDE_FLAG; /* default 1; if user sets to 0, disulfides are ignored */ extern int FLIP_ASN_GLN_HIS_FLAG; /* default 1; if user sets to 0, asn, gln, and his from the template are NOT flipped to optimize energies */ /************************************** atom building variables ****************************************/ /* used for building atoms from chromosomes if charged termini are specificied */ extern RESPARAM *N_TERM_RESPARAM, *C_TERM_RESPARAM; extern double *STATIONARY_LIGAND_TRANSFORM_MATRIX; /* ligand tranform matrix for returning the base coordinates */ /* atomresparams for backbone atoms; used for building atoms; values are alanine values and are defined in read_forcefield.cpp: read_residuedata */ extern ATOMRESPARAM *CB_ATOMRESPARAM, *H_ATOMRESPARAM, *HA_ATOMRESPARAM, extern ATOMRESPARAM *H_ATOMRESPARAM, *HA_ATOMRESPARAM, *O_ATOMRESPARAM; extern BACKBONE DUMMY_BKBN; /* backbone used for calculating residue internal energies */ extern BACKBONE PROLINE_BKBN; /* proline backbone for calculating proline internal energies */