File: poissonBoltzmann.sip

package info (click to toggle)
ball 1.5.0%2Bgit20180813.37fc53c-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 239,888 kB
  • sloc: cpp: 326,149; ansic: 4,208; python: 2,303; yacc: 1,778; lex: 1,099; xml: 958; sh: 322; makefile: 95
file content (156 lines) | stat: -rw-r--r-- 3,547 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
class FDPB
{
%TypeHeaderCode
	#include <BALL/SOLVATION/poissonBoltzmann.h>
%End
	public:

	enum ErrorCode
	{
		ERROR__NONE = -1,
		ERROR__UNKNOWN = 0,
		ERROR__NOT_IMPLEMENTED = 1,
		ERROR__CANNOT_CREATE_ATOM_ARRAY,
		ERROR__CANNOT_CREATE_SAS_GRID,

		ERROR__CANNOT_CREATE_EPSILON_GRID,

		ERROR__CANNOT_CREATE_KAPPA_GRID,
		ERROR__CANNOT_CREATE_CHARGE_GRID,
		ERROR__CANNOT_CREATE_PHI_GRID,
		ERROR__SAS_GRID_REQUIRED,

		ERROR__EPSILON_GRID_REQUIRED,
		ERROR__ATOM_ARRAY_REQUIRED,

		ERROR__PHI_GRID_REQUIRED,
		ERROR__OUT_OF_MEMORY,

		ERROR__UNKNOWN_DIELECTRIC_SMOOTHING_METHOD,

		ERROR__UNKNOWN_CHARGE_DISTRIBUTION_METHOD,

		ERROR__UNKNOWN_BOUNDARY_CONDITION_TYPE,

		ERROR__NOT_A_VECTOR_IN_UPPER_LOWER,

		ERROR__ILLEGAL_VALUE_FOR_LOWER_UPPER,
		ERROR__SETUP_REQUIRED,
		NUMBER_OF_ERRORS
	};

	struct Option
	{
		static const String& VERBOSITY;
		static const String& PRINT_TIMING;
		static const String& SPACING;
		static const String& BORDER;
		static const String& IONIC_STRENGTH;
		static const String& SOLUTE_DC;
		static const String& SOLVENT_DC;
		static const String& PROBE_RADIUS;
		static const String& ION_RADIUS;
		static const String& TEMPERATURE;
		static const String& BOUNDARY;
		static const String& CHARGE_DISTRIBUTION;
		static const String& DIELECTRIC_SMOOTHING;
		static const String& OFFSET;
		static const String& RMS_CRITERION;
		static const String& MAX_CRITERION;
		static const String& CHECK_AFTER_ITERATIONS;
		static const String& MAX_ITERATIONS;
		static const String& LOWER;
		static const String& UPPER;
		static const String& BOUNDING_BOX_LOWER;
		static const String& BOUNDING_BOX_UPPER;
	};

	struct Boundary
	{
		static const String& ZERO;
		static const String& DEBYE;
		static const String& COULOMB;
		static const String& DIPOLE;
		static const String& FOCUSING;
	};

	struct ChargeDistribution
	{
		static const String& TRILINEAR;
		static const String& UNIFORM;
	};

	struct DielectricSmoothing
	{
		static const String& NONE;
		static const String& UNIFORM;
		static const String& HARMONIC;
	};

	class Default
	{
		public:
		static const int VERBOSITY;
		static const bool PRINT_TIMING ;
		static const float SPACING;
		static const float BORDER;
		static const float IONIC_STRENGTH;
		static const float TEMPERATURE;
		static const float PROBE_RADIUS;
		static const float ION_RADIUS;
		static const String BOUNDARY;
		static const String CHARGE_DISTRIBUTION;
		static const String DIELECTRIC_SMOOTHING;
		static const float SOLVENT_DC;
		static const float SOLUTE_DC;
		static const float RMS_CRITERION;
		static const float MAX_CRITERION;
		static const int MAX_ITERATIONS;
		static const int CHECK_AFTER_ITERATIONS;
	};

	class FastAtomStruct
	{
		public:
		float q;
		float r;
		float x;
		float y;
		float z;
		int index;
	};

	typedef struct FastAtomStruct FastAtom;

	FDPB();
	FDPB(const FDPB&);
	FDPB(System&);
	FDPB(Options&);

	FDPB(System&, Options&);
	~FDPB();
	void destroy();
	void destroyGrids();
	bool setup(System&);
	bool setup(System&, Options&);
	bool setupEpsGrid(System&);
	bool setupSASGrid(System&);
	bool setupAtomArray(System&);
	bool setupKappaGrid();
	bool setupQGrid();
	bool setupPhiGrid();
	bool setupBoundary();
	bool solve();
	double getEnergy() const;
	double getReactionFieldEnergy() const;
	double calculateReactionFieldEnergy() const;
	Size getNumberOfIterations() const;
	Index getErrorCode() const;
	static String getErrorMessage(Index);

	Options options;
	Options results;
	RegularData3D* kappa_grid;
	RegularData3D* q_grid;
	RegularData3D* phi_grid;
};