Debian Codegraph @

MoleculesToTriangles/CXXSurface/CXXCreator.h

raw symbols SCIP
1 /*
2 * MoleculesToTriangles/CXXSurface/CXXCreator.h
3 *
4 * Copyright 2009 by Martin Noble, University of Oxford
5 * Author: Martin Noble
6 *
7 * This file is part of Coot
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published
11 * by the Free Software Foundation; either version 3 of the License, or (at
12 * your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * 02110-1301, USA
23 */
24
25 #include <iostream>
26 #include <iomanip>
27
28
29 #ifndef __STRING_H
30 #include <string>
31 #endif
32
33 #ifndef __MMDB_Manager__cxx . . $ `<external>/4178908375504615306/mmdb_manager.h:42:9`!
34 #include "mmdb2/mmdb_manager.h"
35 #include "mmdb2/mmdb_tables.h"
36 #endif
37 #ifndef __CXXException__
38 #include "CXXException.h"cxx . . $ `<file>/MoleculesToTriangles/CXXSurface/CXXException.h`/
39 #endif
40
41 #include "CXXCoord.h"cxx . . $ `<file>/MoleculesToTriangles/CXXSurface/CXXCoord.h`/
42 #ifndef __CXXException__cxx . . $ `MoleculesToTriangles/CXXSurface/CXXException.h:31:9`!
43 #include <CXXException.h>
44 #endif
45 #include "CXXChargeTable.h"cxx . . $ `<file>/MoleculesToTriangles/CXXSurface/CXXChargeTable.h`/
46 class CXXSpacecxx . . $ CXXSpace#;
47
48 #include "clipper/clipper.h"
49
50 using namespace std;
51
52 class CXXCreatorcxx . . $ CXXCreator# {
53
54 private:
55
56 // parameters - values set in constructor
57
58 double gridSpacingcxx . . $ CXXCreator#gridSpacing.; // in A
59 double probeRadiuscxx . . $ CXXCreator#probeRadius.; // in A
60 double zeroSpacecxx . . $ CXXCreator#zeroSpace.;
61 double tempcxx . . $ CXXCreator#temp.; // in K
62 double ionicStrengthcxx . . $ CXXCreator#ionicStrength.; // in mol / dm3
63
64 int antiAliasParacxx . . $ CXXCreator#antiAliasPara.;
65 double scalecxx . . $ CXXCreator#scale. ;
66
67
68 double externalDielectriccxx . . $ CXXCreator#externalDielectric.;
69 double internalDielectriccxx . . $ CXXCreator#internalDielectric.;
70
71 // Knowledge about charges of residues
72 CXXChargeTablecxx . . $ CXXChargeTable# theChargeTablecxx . . $ CXXCreator#theChargeTable.;
73
74 // Matter
75 mmdbcxx . . $ mmdb/::Managercxx . . $ mmdb/Manager#* theMMDBManagercxx . . $ CXXCreator#theMMDBManager.;
76 int nSelAtomscxx . . $ CXXCreator#nSelAtoms.;
77 mmdbcxx . . $ mmdb/::Atomcxx . . $ mmdb/Atom#** SelAtomcxx . . $ CXXCreator#SelAtom.;
78
79 // private read accessors
80 double lookUpChargecxx . . $ CXXCreator#lookUpCharge(4badf5dbac1308a7).(int atomNr);
81 CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>getAtomCoordcxx . . $ CXXCreator#getAtomCoord(15c057576ec5dbae).(int atomNr);
82 double getAtomRadiuscxx . . $ CXXCreator#getAtomRadius(4badf5dbac1308a7).(int atonNr);
83 stringcxx . . $ std/string# getAtomElementcxx . . $ CXXCreator#getAtomElement(7eb93f795f0defb3).(int atomNr);
84 stringcxx . . $ std/string# getAtomNamecxx . . $ CXXCreator#getAtomName(7eb93f795f0defb3).(int atomNr);
85 stringcxx . . $ std/string# getAtomResidueNamecxx . . $ CXXCreator#getAtomResidueName(7eb93f795f0defb3).(int atomNr);
86
87 // private write accessors
88 int addAtomToSpacecxx . . $ CXXCreator#addAtomToSpace(b126dc7c1de90089).();
89
90 // non public stuff thats needs to be done
91 double fractionOfGridPointCoveredByAtomcxx . . $ CXXCreator#fractionOfGridPointCoveredByAtom(ddde804a52e22b10).(CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>thePoint, CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>xGridVector,CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>yGridVector, CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>zGridVector, int atomNr);
92 double getGridVolumeOfAtomcxx . . $ CXXCreator#getGridVolumeOfAtom(ddde804a52e22b10).(CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>gridOrigin, CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>xGridVector, CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>yGridVector, CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>zGridVector, int atomNr);
93 int distributeAtomChargecxx . . $ CXXCreator#distributeAtomCharge(6c1fca26c7c4e94a).(CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>gridOrigin, CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>xGridVector, CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>yGridVector, CXXCoordcxx . . $ CXXCoord#<CXXCoord_ftypecxx . . $ CXXCoord_ftype#>zGridVector, int atomNr);
94 void initcxx . . $ CXXCreator#init(49f6e7a06ebc5aa8).(); //Initialise various parameters, the charge table etc
95 int selectAllAtomscxx . . $ CXXCreator#selectAllAtoms(b126dc7c1de90089).(); //Minimal routine to return selection handle
96 //of a selection containing all atoms
97 public:
98
99 CXXCreatorcxx . . $ CXXCreator#CXXCreator(fda57c8427c60377). (mmdbcxx . . $ mmdb/::pstrcxx . . $ mmdb/pstr# thePdb); // reads a pdb from file to make creator
100 CXXCreatorcxx . . $ CXXCreator#CXXCreator(5b0a958cc70af8d5). (mmdbcxx . . $ mmdb/::Managercxx . . $ mmdb/Manager#* theManager); //can also be created from an MMDBManager ...
101 CXXCreatorcxx . . $ CXXCreator#CXXCreator(9c34b386da98e6f5). (mmdbcxx . . $ mmdb/::Managercxx . . $ mmdb/Manager#* theManager, int selHnd, int context_selHnd=-1); //can also be created from an MMDBManager + selHnd
102
103 int setParameterscxx . . $ CXXCreator#setParameters(e89ebc05548dfaee).( double IonicStrength, double Temperature, double gridSpacing);
104
105 int createSpacecxx . . $ CXXCreator#createSpace(b126dc7c1de90089).(); // calculates box size, makes space (reserves memory), init for FFTW / solventMap stuff
106
107 // adds all the atom shperes to the dielectric map and makes solvent envelope (solventMap stuff)
108 // then generates dielectric grids (i, j and k directed) then assignes and smoothes the dielectric maps
109 int introduceMattercxx . . $ CXXCreator#introduceMatter(1a35796978658aa4).(double dielectricOfSolvent, double dielectricOfProtein);
110
111 // Finds selfconsistent solution for the electrostatic potential based on what we have done so far ..
112 int evolvecxx . . $ CXXCreator#evolve(4f20ba582a324361).(int optionSOR, double convergenceCriterion);
113
114 // space is discrete ...
115 CXXSpacecxx . . $ CXXSpace# *spacecxx . . $ CXXCreator#space.;
116
117 //Return the grid spacing
118 double getGridSpacingcxx . . $ CXXCreator#getGridSpacing(31fa7155c10fdd13).();
119
120 // force a calculation from defined selection with default parameters
121 int calculatecxx . . $ CXXCreator#calculate(b126dc7c1de90089).();
122
123 // after calculation, coerce thecreators data into a clipper map for contouring, interpolating etc
124 clippercxx . . $ clipper/::NXmapcxx . . $ clipper/NXmap#<double> coerceToClipperMapcxx . . $ CXXCreator#coerceToClipperMap(db488893ec2e8845).(clippercxx . . $ clipper/::Cellcxx . . $ clipper/Cell# &cell);
125
126 };
127