delphi_cb
 All Classes Namespaces Files Functions Variables Macros
delphi_datamarshal.h
Go to the documentation of this file.
1 
12 #ifndef CDELPHIDATAMARSHAL_H_
13 #define CDELPHIDATAMARSHAL_H_
14 
15 #include <iostream>
16 #include <string>
17 #include <vector>
18 #include <array>
19 #include <memory> // std::unique_ptr for CIO
20 
21 #include "../interface/interface_datacontainer.h"
22 #include "../interface/interface_datamarshal.h"
23 #include "../misc/misc_timer.h"
24 #include "../io/io.h"
25 #include "delphi_constants.h"
26 #include "delphi_exceptions.h"
27 
28 using namespace std;
29 
38 class CDelphiDataMarshal:virtual public IDataMarshal
39 {
40  private:
41  //-----------------incl_delphimarshal_getStatement.cpp------------------//
42  virtual bool getStatement(string strLineNoSpace);
43 
51  int yesno(string strArgument, string strStatement);
52 
53  //-----------------incl_delphimarshal_getFunction.cpp-------------------//
54  virtual bool getFunction(string strLineNoSpace);
55 
64  string getFile_Name_or_Format(string strArg_UpperCase,string strArg_fromInput);
65 
66  inline vector<string> getArguments(string strParameters);
67 
68  //----------------incl_delphimarshal_showParameters.cpp-----------------//
69 
75  void showParameters() const;
76 
77  public:
78  /*
79  * delphi valid statements shown in user manual version 5.1
80  * see the table of "index of statements and their shorthand" in the manual @ pp.19
81  */
82 
83  //----------------------- set by Statements ------------------------//
84 
106 
141 
188  delphi_real fPercentageFill;
189 
204 
219 
235 
251 
266 
283  delphi_real fExDielec;
284 
307 
322  delphi_real fGridConverge;
323 
342  delphi_integer iGrid;
343 
370  delphi_real fInDielec;
371 
387  vector<delphi_real> vctfSalt;
388 
411  delphi_real fIonRadius;
412 
442 
455  bool bLogGraph;
456 
470 
483  delphi_real fMaxc;
484 
500 
527  vector<bool> vctbPeriodicBndy;
528 
547 
571  vector<delphi_real> vctfProbeRadius;
572 
586  delphi_real fSpectralRadius;
587 
600  delphi_real fRelaxParam;
601 
614  delphi_real fRmsc;
615 
628  delphi_real fScale;
629 
645  bool bSolvePB;
646 
659  vector<int> vctiValence1;
660 
673  vector<int> vctiValence2;
674 
687  delphi_real fPotentialUpperBond;
688 
701  delphi_real fTemper;
702 
717 
725 
733 
734  //-------------------------- io file names ------------------------//
735 
736  /* - IO type : IN
737  * - F95 var.: prmnam
738  * - Default : fort.10
739  * - Description: \n
740  * Default extension prm. Contains input parameters.
741  */
742  //string strParamFile; ///< prmnam(fort.10)
743  // ///< input parameter file
744 
760  string strSizeFile;
761 
773  string strCrgFile;
774 
795  string strPdbFile;
796 
823  string strPhiFile;
824 
833  string strFrciFile;
834 
852  string strFrcFile;
853 
882  string strEpsFile;
883 
914  string strPhiiFile;
915 
930 
941 
952 
962  string strGraspFile;
963 
974 
984  string strScrgFile;
985 
986  //----------------------- set by functions ------------------------//
995 
1004 
1012  bool bIsAcent;
1013 
1022 
1031 
1032  // set by WRITE or OUT function
1033 
1042 
1052 
1062 
1071 
1079  bool bSiteOut;
1080 
1089 
1097  bool bEpsOut;
1098 
1107 
1116 
1125 
1134 
1142  bool bEngOut;
1143 
1152 
1161 
1169  bool bDbOut;
1170 
1179 
1188 
1197 
1205  bool bGridEng;
1206 
1214  bool bSolvEng;
1215 
1224 
1233 
1241  bool bIonsEng;
1242 
1251 
1260 
1269 
1278 
1287 
1296 
1305 
1314 
1323 
1332 
1341 
1350 
1359 
1368 
1377 
1386 
1395 
1404 
1413 
1422 
1433 
1441  bool bIsBuffz;
1442 
1451 
1452  //---------------------------- statements -------------------------//
1453  array<string,iStatementNum> rgstrStatement_ShortForm, rgstrStatement_2lAbbre;
1454 
1455  //------------------------------ functions ------------------------//
1456  array<string,iFunctionNum_FullName> rgstrFunction_FullForm;
1457  array<string,iFunctionNum_ShortName> rgstrFunction_ShortForm;
1458 
1459  //------------------------------ DelPhi ---------------------------//
1466  delphi_real fDebyeLength;
1467 
1474  delphi_real fEpsOut;
1475 
1483 
1491 
1499 
1506  delphi_real fIonStrength;
1507 
1514  delphi_real fTaylorCoeff1;
1515 
1522  delphi_real fTaylorCoeff2;
1523 
1530  delphi_real fTaylorCoeff3;
1531 
1538  delphi_real fTaylorCoeff4;
1539 
1546  delphi_real fTaylorCoeff5;
1547 
1555 
1562  delphi_real fEPKT;
1563 
1570  delphi_real fEpsIn;
1571 
1579 
1587 
1594  delphi_integer iMoleculeNum;
1595 
1602  delphi_real fMaxRadius;
1603 
1611 
1618  vector< SExtrema<delphi_real> > vctefExtrema;
1619 
1626  vector< SGrid<delphi_real> > vctgfAtomCoordA;
1627 
1634  vector< SGrid<delphi_real> > vctgfAtomCoordG;
1635 
1636  //-------------------------------- IO -----------------------------//
1637 
1644  delphi_integer iMediaNum;
1645 
1652  delphi_integer iObjectNum;
1653 
1660  delphi_integer iAtomNum;
1661 
1668  delphi_integer iResidueNum;
1669 
1677 
1684  vector<CAtomPdb> vctapAtomPdb;
1685 
1692  vector<delphi_real> vctfMediaEps;
1693 
1700  vector<string> vctstrObject;
1701 
1708  vector<delphi_integer> vctiAtomMediaNum;
1709 
1710  //------------------------------ Surface --------------------------//
1711 
1718  delphi_integer iCrgGridNum;
1719 
1726  delphi_real fNetCrg;
1727 
1734  delphi_real fMinusCrg;
1735 
1742  delphi_real fPlusCrg;
1743 
1751 
1759 
1767 
1775 
1782  delphi_integer iBndyGridNum;
1783 
1791  vector< SGrid<delphi_integer> > vctgiEpsMap;
1792 
1799  vector<bool> vctbDielecMap;
1800 
1807  vector< SGrid<delphi_integer> > vctgiBndyGrid;
1808 
1815  delphi_integer iCrg2GridNum;
1816 
1823  vector< SGridValue<delphi_real> > vctgvfCrg2Grid;
1824 
1831  vector<delphi_integer> vctiCrg2GridMap;
1832 
1839  vector< SGridValue<delphi_real> > vctgvfAtomCrg;
1840 
1847  vector< SGrid<delphi_real> > vctgfCrgPoseA;
1848 
1855  vector< SGrid<delphi_real> > vctgfSurfCrgA;
1856 
1863  vector<delphi_integer> vctiCrgAt;
1864 
1871  vector<delphi_integer> vctiAtSurf;
1872 
1879  vector<delphi_integer> vctiAtNdx;
1880 
1887  vector< SGrid<delphi_real> > vctgfSurfCrgE;
1888 
1895  vector<delphi_real> vctfAtomEps;
1896 
1897  //------------------------------ Solver ---------------------------//
1898 
1905  delphi_integer iDielecBndySum;
1906 
1913  delphi_integer iCrgedGridSum;
1914 
1921  vector<delphi_real> vctfGridCrg;
1922 
1929  vector< SGrid<delphi_integer> > vctgiGridCrgPose;
1930 
1937  delphi_integer iCrgBdyGrid;
1938 
1945  vector<SDoubleGridValue> vctdgvCrgBndyGrid;
1946 
1953  vector<delphi_real> vctfPhiMap;
1954 
1955  //------------------------------ Energy ---------------------------//
1956 
1963  vector<delphi_real> vctfSurfCrgE;
1964 
1971  delphi_real fEngGrid;
1972 
1979  delphi_real fEngCoul;
1980 
1987  delphi_real fEngCorrect;
1988 
1995  delphi_real fEngReact;
1996 
2003  delphi_real fEngIons;
2004 
2005  //------------------------- NOT TO BE MAPPED ----------------------//
2006 
2014  string strCentFile;
2015 
2022  delphi_real fMaxDimension;
2023 
2024  shared_ptr<CTimer> pTimer; //pointer to an object of CTimer class
2025 
2033  CDelphiDataMarshal(int argc,char* argv[],shared_ptr<CTimer> pt):IDataMarshal(argc,argv),pTimer(pt)
2034  {
2035 #ifdef DEBUG_OBJECT
2036  cout << endl;
2037  cout << "****************************************************************\n";
2038  cout << "* CDelphiDataMarshal is constructed *\n";
2039  cout << "****************************************************************\n";
2040 #endif
2041 
2042  setDefault();
2043  };
2044 
2051  CDelphiDataMarshal(shared_ptr<CTimer> pt):IDataMarshal(),pTimer(pt)
2052  {
2053 #ifdef DEBUG_OBJECT
2054  cout << endl;
2055  cout << "****************************************************************\n";
2056  cout << "* CDelphiDataMarshal is constructed *\n";
2057  cout << "****************************************************************\n";
2058 #endif
2059 
2060  setDefault();
2061  };
2062 
2067  {
2068 #ifdef DEBUG_OBJECT
2069  cout << endl;
2070  cout << "****************************************************************\n";
2071  cout << "* CDelphiDataMarshal is destroyed *\n";
2072  cout << "****************************************************************\n";
2073 #endif
2074  };
2075 
2079  void setDefault();
2080 
2084  virtual void updateParameters();
2085 };
2086 
2087 #endif // CDELPHIDATAMARSHAL_H_
int iPhiFormatOut
Definition: delphi_datamarshal.h:1051
vector< bool > vctbPeriodicBndy
Definition: delphi_datamarshal.h:527
SGrid< delphi_real > gfAcent
Definition: delphi_datamarshal.h:1003
delphi_integer iMediaNum
Definition: delphi_datamarshal.h:1644
SGrid< delphi_real > gfMaxCoordinate
Definition: delphi_datamarshal.h:1774
delphi_real fRelaxParam
Definition: delphi_datamarshal.h:600
delphi_real fPercentageFill
Definition: delphi_datamarshal.h:188
bool bPdbUnformatIn
Definition: delphi_datamarshal.h:1030
delphi_real fEngReact
Definition: delphi_datamarshal.h:1995
delphi_real fExDielec
Definition: delphi_datamarshal.h:283
vector< int > vctiValence2
Definition: delphi_datamarshal.h:673
vector< SExtrema< delphi_real > > vctefExtrema
Definition: delphi_datamarshal.h:1618
bool bDbOut
Definition: delphi_datamarshal.h:1169
string strCentFile
Definition: delphi_datamarshal.h:2014
string strScrgFile
Definition: delphi_datamarshal.h:984
delphi_real fEngGrid
Definition: delphi_datamarshal.h:1971
int iTypeSurf
Definition: delphi_datamarshal.h:1450
delphi_real fTaylorCoeff4
Definition: delphi_datamarshal.h:1538
delphi_real fTaylorCoeff3
Definition: delphi_datamarshal.h:1530
string strSizeFile
Definition: delphi_datamarshal.h:760
bool bSurfCrgOut
Definition: delphi_datamarshal.h:1187
bool bLogGraph
Definition: delphi_datamarshal.h:455
bool bModPdbOut
Definition: delphi_datamarshal.h:1106
string strGraspFile
Definition: delphi_datamarshal.h:962
CDelphiDataMarshal(int argc, char *argv[], shared_ptr< CTimer > pt)
Definition: delphi_datamarshal.h:2033
int iFrcFormatOut
Definition: delphi_datamarshal.h:1088
vector< delphi_integer > vctiAtNdx
Definition: delphi_datamarshal.h:1879
string strPdbFile
Definition: delphi_datamarshal.h:795
SGrid< delphi_real > gfCoordinateRange
Definition: delphi_datamarshal.h:1482
delphi_real fSpectralRadius
Definition: delphi_datamarshal.h:586
delphi_real fNetCrg
Definition: delphi_datamarshal.h:1726
bool bAnalySurfEng
Definition: delphi_datamarshal.h:1223
delphi_real fTaylorCoeff1
Definition: delphi_datamarshal.h:1514
int iConvergeFract
Definition: delphi_datamarshal.h:234
bool bFixedRelaxParam
Definition: delphi_datamarshal.h:203
bool bTotalPotentialInSite
Definition: delphi_datamarshal.h:1349
delphi_real fDebyeLength
Definition: delphi_datamarshal.h:1466
delphi_integer iBndyGridNum
Definition: delphi_datamarshal.h:1782
bool bGridEng
Definition: delphi_datamarshal.h:1205
delphi_integer iAtomNum
Definition: delphi_datamarshal.h:1660
vector< SGrid< delphi_real > > vctgfAtomCoordG
Definition: delphi_datamarshal.h:1634
bool bCoulombPotentialInSite
Definition: delphi_datamarshal.h:1322
delphi_real fMaxRadius
Definition: delphi_datamarshal.h:1602
delphi_integer iCrgBdyGrid
Definition: delphi_datamarshal.h:1937
bool bAnalyEng
Definition: delphi_datamarshal.h:1232
bool bPotentialInSite
Definition: delphi_datamarshal.h:1403
bool bIsBuffz
Definition: delphi_datamarshal.h:1441
bool bManualRelaxParam
Definition: delphi_datamarshal.h:732
int iNonIterateNum
Definition: delphi_datamarshal.h:499
vector< SGrid< delphi_integer > > vctgiEpsMap
Definition: delphi_datamarshal.h:1791
bool bOutGraspSurf
Definition: delphi_datamarshal.h:218
SGrid< delphi_real > gfMinusCrgCenter
Definition: delphi_datamarshal.h:1758
string strUnformatPdbFile
Definition: delphi_datamarshal.h:940
bool bNonlinearEng
Definition: delphi_datamarshal.h:1554
bool bSurfCrgInSite
Definition: delphi_datamarshal.h:1385
string strModifiedPdbFile
Definition: delphi_datamarshal.h:929
delphi_real fPlusCrg
Definition: delphi_datamarshal.h:1742
bool bEngOut
Definition: delphi_datamarshal.h:1142
string strPhiiFile
Definition: delphi_datamarshal.h:914
bool bAtomPotentialInSite
Definition: delphi_datamarshal.h:1286
delphi_real fMaxDimension
Definition: delphi_datamarshal.h:2022
SGrid< delphi_real > gfPotentialDrop
Definition: delphi_datamarshal.h:716
delphi_real fPotentialUpperBond
Definition: delphi_datamarshal.h:687
bool bReactForceInSite
Definition: delphi_datamarshal.h:1358
delphi_real fEngIons
Definition: delphi_datamarshal.h:2003
vector< delphi_integer > vctiCrgAt
Definition: delphi_datamarshal.h:1863
bool bMDInSite
Definition: delphi_datamarshal.h:1376
vector< delphi_integer > vctiAtomMediaNum
Definition: delphi_datamarshal.h:1708
vector< SGrid< delphi_real > > vctgfSurfCrgA
Definition: delphi_datamarshal.h:1855
bool bGridPotentialInSite
Definition: delphi_datamarshal.h:1277
delphi_real fEngCoul
Definition: delphi_datamarshal.h:1979
bool bExitUniformDielect
Definition: delphi_datamarshal.h:265
Definition: interface_datamarshal.h:22
bool bSiteOut
Definition: delphi_datamarshal.h:1079
vector< bool > vctbDielecMap
Definition: delphi_datamarshal.h:1799
bool bOutCrgDensity
Definition: delphi_datamarshal.h:546
delphi_real fIonRadius
Definition: delphi_datamarshal.h:411
vector< delphi_integer > vctiCrg2GridMap
Definition: delphi_datamarshal.h:1831
delphi_integer iCrg2GridNum
Definition: delphi_datamarshal.h:1815
SGrid< delphi_real > gfPlusCrgCenter
Definition: delphi_datamarshal.h:1750
delphi_integer iResidueNum
Definition: delphi_datamarshal.h:1668
bool bBiosystemOut
Definition: delphi_datamarshal.h:1061
delphi_real fIonStrength
Definition: delphi_datamarshal.h:1506
bool bAtomInSite
Definition: delphi_datamarshal.h:1259
delphi_real fEpsIn
Definition: delphi_datamarshal.h:1570
vector< int > vctiValence1
Definition: delphi_datamarshal.h:659
string strEnergyFile
Definition: delphi_datamarshal.h:973
vector< delphi_real > vctfGridCrg
Definition: delphi_datamarshal.h:1921
int iLinIterateNum
Definition: delphi_datamarshal.h:441
delphi_real fMaxc
Definition: delphi_datamarshal.h:483
bool bCrgInterplateType
Definition: delphi_datamarshal.h:306
string strEpsFile
Definition: delphi_datamarshal.h:882
bool bSolvePB
Definition: delphi_datamarshal.h:645
vector< SDoubleGridValue > vctdgvCrgBndyGrid
Definition: delphi_datamarshal.h:1945
string strUnformatFrcFile
Definition: delphi_datamarshal.h:951
bool bCoulombEng
Definition: delphi_datamarshal.h:1250
bool bReactFieldInFRC
Definition: delphi_datamarshal.h:1412
vector< delphi_real > vctfSurfCrgE
Definition: delphi_datamarshal.h:1963
bool bOnlyMolecule
Definition: delphi_datamarshal.h:1676
bool bUniformDielec
Definition: delphi_datamarshal.h:1610
bool bCrgInSite
Definition: delphi_datamarshal.h:1268
bool bUnformatFrcOut
Definition: delphi_datamarshal.h:1133
string strCrgFile
Definition: delphi_datamarshal.h:773
bool bGridCrgOut
Definition: delphi_datamarshal.h:1151
bool bSurfEngOut
Definition: delphi_datamarshal.h:1178
SExtrema< delphi_integer > eiBuffz
Definition: delphi_datamarshal.h:1432
vector< SGrid< delphi_real > > vctgfSurfCrgE
Definition: delphi_datamarshal.h:1887
SGrid< delphi_real > gfGeometricCenter
Definition: delphi_datamarshal.h:1490
string strFrcFile
Definition: delphi_datamarshal.h:852
bool bEpsOut
Definition: delphi_datamarshal.h:1097
vector< delphi_real > vctfSalt
Definition: delphi_datamarshal.h:387
vector< SGrid< delphi_integer > > vctgiGridCrgPose
Definition: delphi_datamarshal.h:1929
bool bDebyeFractionInSite
Definition: delphi_datamarshal.h:1295
delphi_real fGridConverge
Definition: delphi_datamarshal.h:322
delphi_integer iObjectNum
Definition: delphi_datamarshal.h:1652
bool bCoulombForceInSite
Definition: delphi_datamarshal.h:1367
delphi_real fTaylorCoeff2
Definition: delphi_datamarshal.h:1522
int iDirectEpsMap
Definition: delphi_datamarshal.h:1586
int iPdbFormatIn
Definition: delphi_datamarshal.h:1021
bool bSolvEng
Definition: delphi_datamarshal.h:1214
delphi_real fTaylorCoeff5
Definition: delphi_datamarshal.h:1546
vector< string > vctstrObject
Definition: delphi_datamarshal.h:1700
vector< CAtomPdb > vctapAtomPdb
Definition: delphi_datamarshal.h:1684
delphi_real fEngCorrect
Definition: delphi_datamarshal.h:1987
delphi_real fTemper
Definition: delphi_datamarshal.h:701
CDelphiDataMarshal(shared_ptr< CTimer > pt)
Definition: delphi_datamarshal.h:2051
bool bUnformatPdbOut
Definition: delphi_datamarshal.h:1124
bool bAutoConverge
Definition: delphi_datamarshal.h:105
vector< delphi_real > vctfPhiMap
Definition: delphi_datamarshal.h:1953
vector< SGrid< delphi_real > > vctgfAtomCoordA
Definition: delphi_datamarshal.h:1626
delphi_real fEPKT
Definition: delphi_datamarshal.h:1562
vector< delphi_real > vctfMediaEps
Definition: delphi_datamarshal.h:1692
Definition: delphi_datamarshal.h:38
int iIterateInterval
Definition: delphi_datamarshal.h:250
globally defined constants used for delphicpp
bool bBemSrfOut
Definition: delphi_datamarshal.h:1070
bool bAtomCoordInSite
Definition: delphi_datamarshal.h:1331
warnings/exceptions occurring in classes CDelphiData and CDelphiDataMarshal
string strPhiFile
Definition: delphi_datamarshal.h:823
SGrid< delphi_real > gfOffCenter
Definition: delphi_datamarshal.h:994
delphi_real fMinusCrg
Definition: delphi_datamarshal.h:1734
bool bPDB2FRCInSite
Definition: delphi_datamarshal.h:1421
vector< SGrid< delphi_real > > vctgfCrgPoseA
Definition: delphi_datamarshal.h:1847
vector< SGrid< delphi_integer > > vctgiBndyGrid
Definition: delphi_datamarshal.h:1807
delphi_real fScale
Definition: delphi_datamarshal.h:628
int iSurfCrgFormatOut
Definition: delphi_datamarshal.h:1196
bool bLogPotential
Definition: delphi_datamarshal.h:469
bool bSpectralRadius
Definition: delphi_datamarshal.h:724
bool bTotalForceInSite
Definition: delphi_datamarshal.h:1394
SGrid< delphi_real > gfMinCoordinate
Definition: delphi_datamarshal.h:1766
delphi_integer iGrid
Definition: delphi_datamarshal.h:342
int iBndyType
Definition: delphi_datamarshal.h:140
delphi_real fRmsc
Definition: delphi_datamarshal.h:614
delphi_real fInDielec
Definition: delphi_datamarshal.h:370
~CDelphiDataMarshal()
Definition: delphi_datamarshal.h:2066
int iModPdbFormatOut
Definition: delphi_datamarshal.h:1115
bool bReactPotentialInSite
Definition: delphi_datamarshal.h:1313
bool bPhimapOut
Definition: delphi_datamarshal.h:1041
SGrid< delphi_real > gfBoxCenter
Definition: delphi_datamarshal.h:1498
bool bSaltInSite
Definition: delphi_datamarshal.h:1340
string strFrciFile
Definition: delphi_datamarshal.h:833
delphi_real fEpsOut
Definition: delphi_datamarshal.h:1474
bool bFrcUnformatIn
Definition: delphi_datamarshal.h:1578
delphi_integer iDielecBndySum
Definition: delphi_datamarshal.h:1905
vector< SGridValue< delphi_real > > vctgvfCrg2Grid
Definition: delphi_datamarshal.h:1823
bool bFieldInSite
Definition: delphi_datamarshal.h:1304
delphi_integer iMoleculeNum
Definition: delphi_datamarshal.h:1594
vector< delphi_integer > vctiAtSurf
Definition: delphi_datamarshal.h:1871
bool bIonsEng
Definition: delphi_datamarshal.h:1241
vector< delphi_real > vctfAtomEps
Definition: delphi_datamarshal.h:1895
delphi_integer iCrgGridNum
Definition: delphi_datamarshal.h:1718
vector< delphi_real > vctfProbeRadius
Definition: delphi_datamarshal.h:571
vector< SGridValue< delphi_real > > vctgvfAtomCrg
Definition: delphi_datamarshal.h:1839
bool bHsurf2DatOut
Definition: delphi_datamarshal.h:1160
bool bIsAcent
Definition: delphi_datamarshal.h:1012
delphi_integer iCrgedGridSum
Definition: delphi_datamarshal.h:1913