17 #include "../interface/interface_datacontainer.h"
18 #include "../misc/misc_timer.h"
19 #include "../misc/misc_interpl.h"
20 #include "../delphi/delphi_constants.h"
22 #include "site_exceptions.h"
34 shared_ptr<CTimer> pTimer;
36 const delphi_integer& iGrid;
37 const delphi_real& fPercentageFill;
38 const delphi_real& fExDielec;
39 const delphi_real& fIonRadius;
40 const vector<delphi_real>& rgfProbeRadius;
41 const int& iLinIterateNum;
42 const int& iNonIterateNum;
44 const delphi_real& fPotentialUpperBond;
45 const bool& bOutCrgDensity;
47 const string& strFrciFile;
48 const string& strFrcFile;
49 const string& strPhiFile;
51 const bool& bAtomInSite;
52 const bool& bSaltInSite;
53 const bool& bMDInSite;
54 const bool& bPotentialInSite;
55 const int& iPhiFormatOut;
56 const bool& bBiosystemOut;
58 const delphi_real& fIonStrength;
60 const vector< SGrid<delphi_real> >& prgfgAtomCoordA;
61 const delphi_real& fTaylorCoeff1;
62 const delphi_real& fTaylorCoeff2;
63 const delphi_real& fTaylorCoeff3;
64 const delphi_real& fTaylorCoeff4;
65 const delphi_real& fTaylorCoeff5;
67 const delphi_integer& iBndyGridNum;
68 const delphi_integer& iCrgGridNum;
69 const vector< SGridValue<delphi_real> >& prggvAtomicCrg;
70 const vector< SGrid<delphi_real> >& prgfgCrgPoseA;
71 const vector< SGrid<delphi_real> >& prgfgSurfCrgA;
72 const vector<delphi_integer>& prgiCrgAt;
73 const vector<delphi_integer>& prgiAtSurf;
74 const vector< SGrid<delphi_real> >& prgfgSurfCrgE;
75 const vector<bool>& prgbDielecMap;
76 const vector< SGrid<delphi_integer> >& prgigBndyGrid;
77 const vector<delphi_real>& prgfAtomEps;
78 const vector<delphi_integer>& prgiAtNdx;
80 const delphi_integer& iDielecBndySum;
82 const vector<delphi_real>& prgfSurfCrgE;
84 bool& bAtomCoordInSite;
87 bool& bGridPotentialInSite;
88 bool& bReactPotentialInSite;
89 bool& bCoulombPotentialInSite;
90 bool& bAtomPotentialInSite;
91 bool& bDebyeFractionInSite;
93 bool& bTotalForceInSite;
94 bool& bReactForceInSite;
95 bool& bTotalPotentialInSite;
96 bool& bCoulombForceInSite;
100 vector<delphi_real>& prgfPhiMap;
106 delphi_real *** phimap;
108 vector< SGrid<delphi_real> > rforceeps1();
110 vector< SGrid<delphi_real> > rforce();
118 void writePotential_insight(vector<delphi_real>& phimapIn);
120 void writePotential_grasp(vector<delphi_real>& phimapIn);
122 void writePotential_ccp4(vector<delphi_real>& phimapIn);
124 void writePotential_fromPrevious(vector<delphi_real>& phimapIn);
126 void writePotential_cube();
128 void writePotential_delphi();
130 void writePhiMap(
const int& formatflag,vector<delphi_real>& phimap4,ofstream& ofFileStream);
132 void expand(
const int& mgrid, vector<delphi_real>& phimapIn);
136 vector<delphi_real> mcce_phiv;
139 CSite(shared_ptr<IDataContainer> pdc,shared_ptr<CTimer> pt):
140 CIO(pdc->getKey_Val<delphi_real>(
"repsin"),pdc->getKey_Val<delphi_real>(
"epkt")),
143 iGrid(pdc->getKey_constRef<delphi_integer>(
"igrid")),
144 fPercentageFill(pdc->getKey_constRef<delphi_real>(
"perfil")),
145 fExDielec(pdc->getKey_constRef<delphi_real>(
"repsout")),
146 fIonRadius(pdc->getKey_constRef<delphi_real>(
"exrad")),
147 rgfProbeRadius(pdc->getKey_constRef< vector<delphi_real> >(
"radprb")),
148 iLinIterateNum(pdc->getKey_constRef<
int>(
"nlit")),
149 iNonIterateNum(pdc->getKey_constRef<
int>(
"nnit")),
150 iBndyType(pdc->getKey_constRef<
int>(
"ibctyp")),
151 fPotentialUpperBond(pdc->getKey_constRef<delphi_real>(
"atompotdist")),
152 bOutCrgDensity(pdc->getKey_constRef<
bool>(
"iconc")),
154 strFrciFile(pdc->getKey_constRef<
string>(
"frcinam")),
155 strFrcFile(pdc->getKey_constRef<
string>(
"frcnam")),
156 strPhiFile(pdc->getKey_constRef<
string>(
"phinam")),
158 bAtomInSite(pdc->getKey_constRef<
bool>(
"isita")),
159 bSaltInSite(pdc->getKey_constRef<
bool>(
"isiti")),
160 bMDInSite(pdc->getKey_constRef<
bool>(
"isitmd")),
161 bPotentialInSite(pdc->getKey_constRef<
bool>(
"isitpot")),
162 iPhiFormatOut(pdc->getKey_constRef<
int>(
"phifrm")),
163 bBiosystemOut(pdc->getKey_constRef<
bool>(
"ibios")),
165 fIonStrength(pdc->getKey_constRef<delphi_real>(
"rionst")),
168 fTaylorCoeff1(pdc->getKey_constRef<delphi_real>(
"chi1")),
169 fTaylorCoeff2(pdc->getKey_constRef<delphi_real>(
"chi2")),
170 fTaylorCoeff3(pdc->getKey_constRef<delphi_real>(
"chi3")),
171 fTaylorCoeff4(pdc->getKey_constRef<delphi_real>(
"chi4")),
172 fTaylorCoeff5(pdc->getKey_constRef<delphi_real>(
"chi5")),
174 iBndyGridNum(pdc->getKey_constRef<delphi_integer>(
"ibnum")),
175 iCrgGridNum(pdc->getKey_constRef<delphi_integer>(
"nqass")),
179 prgiCrgAt(pdc->getKey_constRef< vector<delphi_integer> >(
"crgatn")),
180 prgiAtSurf(pdc->getKey_constRef< vector<delphi_integer> >(
"atsurf")),
182 prgbDielecMap(pdc->getKey_constRef< vector<bool> >(
"idebmap")),
184 prgfAtomEps(pdc->getKey_constRef< vector<delphi_real> >(
"atmeps")),
185 prgiAtNdx(pdc->getKey_constRef< vector<delphi_integer> >(
"atndx")),
187 iDielecBndySum(pdc->getKey_constRef<delphi_integer>(
"icount2b")),
189 prgfSurfCrgE(pdc->getKey_constRef< vector<delphi_real> >(
"schrg")),
191 bAtomCoordInSite(pdc->getKey_Ref<
bool>(
"isitx")),
192 bCrgInSite(pdc->getKey_Ref<
bool>(
"isitq")),
193 bFieldInSite(pdc->getKey_Ref<
bool>(
"isitf")),
194 bGridPotentialInSite(pdc->getKey_Ref<
bool>(
"isitp")),
195 bReactPotentialInSite(pdc->getKey_Ref<
bool>(
"isitr")),
196 bCoulombPotentialInSite(pdc->getKey_Ref<
bool>(
"isitc")),
197 bAtomPotentialInSite(pdc->getKey_Ref<
bool>(
"isitap")),
198 bDebyeFractionInSite(pdc->getKey_Ref<
bool>(
"isitdeb")),
199 bSurfCrgInSite(pdc->getKey_Ref<
bool>(
"isitsf")),
200 bTotalForceInSite(pdc->getKey_Ref<
bool>(
"isittf")),
201 bReactForceInSite(pdc->getKey_Ref<
bool>(
"isitrf")),
202 bTotalPotentialInSite(pdc->getKey_Ref<
bool>(
"isitt")),
203 bCoulombForceInSite(pdc->getKey_Ref<
bool>(
"isitcf")),
204 bPDB2FRCInSite(pdc->getKey_Ref<
bool>(
"iself")),
205 iFrcFormatOut(pdc->getKey_Ref<
int>(
"frcfrm")),
206 fScale(pdc->getKey_Ref<delphi_real>(
"scale")),
207 prgfPhiMap(pdc->getKey_Ref< vector<delphi_real> >(
"phimap"))
211 cout <<
"****************************************************************\n";
212 cout <<
"* CSite is constructed *\n";
213 cout <<
"****************************************************************\n";
217 iResidueNum = pdc->getKey_Val<delphi_integer>(
"resnummax");
218 vctfMediaEps = pdc->getKey_Val< vector<delphi_real> >(
"medeps");
219 iMediaNum = pdc->getKey_Val<delphi_integer>(
"nmedia");
220 iAtomNum = pdc->getKey_Val<delphi_integer>(
"natom");
221 vctapAtomPdb = pdc->getKey_Val< vector<CAtomPdb> >(
"delphipdb");
224 phimap = pdc->getKey_Ptr<delphi_real>(
"phimap",iGrid,iGrid,iGrid);
237 for(
int i = 0; i != iGrid; ++i)
249 cout <<
"****************************************************************\n";
250 cout <<
"* CSite is destroyed *\n";
251 cout <<
"****************************************************************\n";
255 void writeSite(
const int& iisitsf);
~CSite()
Definition: site.h:232