Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

electrostmod.h

00001 
00009 #ifndef ELECTROSTMOD_H
00010 #define ELECTROSTMOD_H
00011 
00012 #include "hastl.h"
00013 #include "vec3d.h"
00014 #include "hastring.h"
00015 #include "hacompmod.h"
00016 #include "hasurface.h"
00017 
00018 class HaSurface;
00019 class HaMolSet;
00020 class AtomList;
00021 class HaResidue;
00022 class AltChemState;
00023 
00024 const int RDX_SHFT_VS_VAC=0x0001;            
00025 const int RDX_SHFT_VS_SOLV=0x0002;           
00026 
00027 const int FILL_CHARGE_PROD_REV_DIST = 0;     
00028 
00029 const int FILL_CHARGE_SUM_REV_DIST = 1;      
00030 
00031 
00032 enum ELPOT_FILE_FORMAT { HLM_F3D_BIN = 0, HLM_F3D_FORM = 1, ELPOT_DELPHI_BIN = 2}; 
00033 
00034 
00036 class ElectrostMod : public HaCompMod
00037 {
00038 public:
00039         ElectrostMod(HaMolSet* new_phost_mset = NULL);
00040         virtual ~ElectrostMod();
00041 
00042         void clear();    
00043 
00044         bool SetStdParam();      
00045         bool SaveParamFile();    
00046         bool SaveChargeFile();   
00047         bool SaveRadiusFile();   
00048         bool SaveCoordFile();    
00049         bool RunDelphi(RunMode rmode); 
00050         bool run(RunMode rmode);  
00051 
00052         bool CalcETReorgEne();    
00053         bool CalcAltStatePK(AltChemState* alt_res_st, AtomList* active_atoms = NULL); 
00054         bool CalcRedoxPotShft();  
00055     double CalcAvgPotOn(PointCollection* ptlist); 
00056 
00057         bool ReadTotEne(double &tot_ene, const char* fname= "DELPHI_RES.OUT"); 
00058 
00059         int LoadElPotFromFile(int format = HLM_F3D_BIN); 
00060         
00061         bool BuildPotIsoSurface(); 
00062         bool CalcIndCharge();  
00063     bool PlotIndCharge();  
00064     bool FillChargeMap();  
00065         bool BuildPotVdwDots();   
00066         bool ColorMolSurfElPot(); 
00067  
00068 
00069 // Set boundaries of the molecule 
00070 
00071         bool AddBoundaryAtoms(); 
00072         
00073     Vec3D min_coord; 
00074         Vec3D max_coord; 
00075 
00076         bool SetBoundaryAtoms(const double xmin, const double ymin, const double zmin,  
00077                                                   const double xmax, const double ymax, const double zmax); 
00078 
00079         bool ClearBoundaryAtoms(); 
00080 
00081 // Delphi run parameters
00082 
00083         HaString param_file_title;  
00084         int nx, ny, nz;            
00085         double perfil;             
00086         double offset[3];          
00087         double epsi, epsout;       
00088         double rionst;             
00089         double exrad, radprb;      
00090         int boundary;              
00091     int iper[3];               
00092         int nlit;                  
00093         int nnit;                  
00094         int iconc, ibios;          
00095         int isite;                 
00096         int iatout;                
00097         HaString toplbl;           
00098         int isph;                  
00099         int ipdbwrt;               
00100     int ifrcwrt;               
00101         HaString enc;              
00102         int igraph, ipotent, icon1, icon2;
00103         int imem;                  
00104         int phiwrt;                
00105     int ihs,isen,ish;          
00106 
00107         double elpot_low_val;      
00108         double elpot_high_val;     
00109         
00110         HaString param_file_name;   
00111         HaString charge_file_name;  
00112         HaString radius_file_name;  
00113         HaString coord_file_name;   
00114         HaString log_file_name;     
00115 
00116         HaString elfield_fname;     
00117 
00118         float pot_isolevel;  
00119         int dots_number;     
00120 
00121     double tot_ene;  
00122 
00123         HaField3D el_pot_map; 
00124         list<HaSurface*> Surfaces;
00125 
00126         int fill_charge_mode; 
00127     
00128     HaField3D charge_map; 
00129         HaField3D ind_charge_map; 
00130         int rdx_shft_mode;   
00131     double rdx_shift;    
00132 
00133         HaVec_double axx_ene; 
00134 
00135 protected:
00136 
00137 };
00138 
00139 
00140 extern "C"
00141 {
00142         void openpm_(integer* pnx_f, integer* pny_f, integer* pnz_f,
00143                          freal* pxmin_f, freal* pxmax_f, freal* pymin_f,
00144                                  freal* ymax_f,  freal* zmin_f,  freal* zmax_f,
00145                          char* fname, int fnmlen); 
00146 
00147         void loadpm_(integer* pnx_f, integer* pny_f, integer* pnz_f, 
00148                          freal* fmap);
00149 
00150 #if defined(INT_DELPHI)
00151 
00152 const int NGCRG_Q = 200000; 
00153 
00154 #if defined(ELECTROSTMOD_CPP)
00155 
00156 
00157 void rdprm2_(logical* iautocon,
00158                          freal* epsin, freal* epsout,
00159                                  freal* rionst, freal* exrad, freal* radprb,
00160                                  int_4* ibctyp, logical* iper, int_4* nlit, int_4* nnit,
00161                                  logical* iconc, logical* imem, 
00162                                  int_4* icon1, int_4* icon2);
00163 
00164 void setatq_(freal* xn2, freal* rad3, freal* chrgv4, int_4* natom, freal* ptr_gr_cent, freal* pscale);
00165 
00166 void getpotm_(int_4* ngrid, freal* potmap, 
00167                          freal* pxmin,  freal* pymin, freal* pzmin, 
00168              freal* pxmax,  freal* pymax, freal* pzmax);
00169 
00170 void geteneq_(freal* ptot_ene);
00171     
00172 #endif
00173 
00174 void delphi_(freal* x, int_4* mgrid, freal* phi, freal* phi1, freal* phi2, freal* phi3, freal* achrg,
00175                          int_4* ieps, int_4* ieps_2, int_4* ideb, 
00176                          freal*  sf1, freal*   sf2, freal* qmap1, freal*  qmap2, freal* debmap1, freal* debmap2,
00177                          freal* bndx1,freal* bndx2,freal* bndx3,freal* bndx4,freal* bndx,freal* bndy,freal* bndz,
00178                          freal* db, int_4* ibgrd,int_4* idpos,int_4* ioff,int_4* iepsv); 
00179 
00180 typedef struct{
00181         freal scale;
00182         freal oldmid[3];
00183         int_4 igrid;
00184         int_4 ibc;
00185         freal gten;
00186         freal cgbp[2*NGCRG_Q];
00187         freal gval[NGCRG_Q];
00188         freal rmmin;
00189         freal rmmax;
00190 } scaleq_type; 
00191 
00192 extern scaleq_type scaleq_;
00193 
00194 typedef struct{
00195         int_4 iphi,iphi1,iphi2,iphi3;
00196 } hadel1_type;
00197 
00198 extern hadel1_type hadel1_; 
00199         
00200 
00201 #endif
00202 
00203 }
00204 
00205 
00206 #endif // end if !defined(ELECTROSTMOD_H) 

Generated on Tue Feb 17 02:03:02 2004 for harlem by doxygen 1.3.6