BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
SOLVATION
poissonBoltzmann.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
// $Id: poissonBoltzmann.h,v 1.31 2005/12/23 17:02:00 amoll Exp $
5
//
6
7
// Finite Difference Poisson Boltzmann Solver
8
9
#ifndef BALL_SOLVATION_POISSONBOLTZMANN_H
10
#define BALL_SOLVATION_POISSONBOLTZMANN_H
11
12
#ifndef BALL_COMMON_H_
13
# include <
BALL/common.h
>
14
#endif
15
16
#ifndef BALL_DATATYPE_REGULARDATA3D_H
17
# include <
BALL/DATATYPE/regularData3D.h
>
18
#endif
19
20
#ifndef BALL_KERNEL_SYSTEM_H
21
# include <
BALL/KERNEL/system.h
>
22
#endif
23
24
#ifndef BALL_DATATYPE_OPTIONS_H
25
# include <
BALL/DATATYPE/options.h
>
26
#endif
27
28
#include <vector>
29
using
std::vector;
30
31
namespace
BALL
32
{
36
class
BALL_EXPORT
FDPB
37
{
38
39
public
:
40
45
enum
ErrorCode
46
{
49
ERROR__NONE = -1,
50
53
ERROR__UNKNOWN = 0,
54
58
ERROR__NOT_IMPLEMENTED = 1,
59
66
ERROR__CANNOT_CREATE_ATOM_ARRAY
,
67
74
ERROR__CANNOT_CREATE_SAS_GRID
,
75
84
ERROR__CANNOT_CREATE_EPSILON_GRID
,
85
93
ERROR__CANNOT_CREATE_KAPPA_GRID
,
94
101
ERROR__CANNOT_CREATE_CHARGE_GRID
,
102
109
ERROR__CANNOT_CREATE_PHI_GRID
,
110
117
ERROR__SAS_GRID_REQUIRED
,
118
126
ERROR__EPSILON_GRID_REQUIRED
,
127
134
ERROR__ATOM_ARRAY_REQUIRED
,
135
143
ERROR__PHI_GRID_REQUIRED
,
144
150
ERROR__OUT_OF_MEMORY
,
151
160
ERROR__UNKNOWN_DIELECTRIC_SMOOTHING_METHOD
,
161
169
ERROR__UNKNOWN_CHARGE_DISTRIBUTION_METHOD
,
170
178
ERROR__UNKNOWN_BOUNDARY_CONDITION_TYPE
,
179
187
ERROR__NOT_A_VECTOR_IN_UPPER_LOWER
,
188
197
ERROR__ILLEGAL_VALUE_FOR_LOWER_UPPER
,
198
204
ERROR__SETUP_REQUIRED
,
205
208
NUMBER_OF_ERRORS
209
};
210
216
struct
BALL_EXPORT
Option
217
{
225
static
const
String
VERBOSITY
;
226
236
static
const
String
PRINT_TIMING
;
237
245
static
const
String
SPACING
;
246
255
static
const
String
BORDER
;
256
265
static
const
String
IONIC_STRENGTH
;
266
272
static
const
String
SOLUTE_DC
;
273
279
static
const
String
SOLVENT_DC
;
280
286
static
const
String
PROBE_RADIUS
;
287
292
static
const
String
ION_RADIUS
;
293
299
static
const
String
TEMPERATURE
;
300
308
static
const
String
BOUNDARY
;
309
317
static
const
String
CHARGE_DISTRIBUTION
;
318
329
static
const
String
DIELECTRIC_SMOOTHING
;
330
338
static
const
String
OFFSET
;
339
348
static
const
String
RMS_CRITERION
;
349
357
static
const
String
MAX_CRITERION
;
358
365
static
const
String
CHECK_AFTER_ITERATIONS
;
366
375
static
const
String
MAX_ITERATIONS
;
376
385
static
const
String
LOWER
;
386
391
static
const
String
UPPER
;
392
398
static
const
String
BOUNDING_BOX_LOWER
;
399
404
static
const
String
BOUNDING_BOX_UPPER
;
405
406
};
407
411
struct
BALL_EXPORT
Boundary
412
{
419
static
const
String
ZERO
;
420
431
static
const
String
DEBYE
;
432
436
static
const
String
COULOMB
;
437
440
static
const
String
DIPOLE
;
441
448
static
const
String
FOCUSING
;
449
};
450
453
struct
BALL_EXPORT
ChargeDistribution
454
{
458
static
const
String
TRILINEAR
;
459
463
static
const
String
UNIFORM
;
464
};
465
472
struct
BALL_EXPORT
DielectricSmoothing
473
{
476
static
const
String
NONE
;
477
485
static
const
String
UNIFORM
;
486
494
static
const
String
HARMONIC
;
495
};
496
501
struct
BALL_EXPORT
Default
502
{
507
static
const
int
VERBOSITY
;
508
513
static
const
bool
PRINT_TIMING
;
514
519
static
const
float
SPACING
;
520
525
static
const
float
BORDER
;
526
531
static
const
float
IONIC_STRENGTH
;
532
537
static
const
float
TEMPERATURE
;
538
545
static
const
float
PROBE_RADIUS
;
546
551
static
const
float
ION_RADIUS
;
552
558
static
const
String
BOUNDARY
;
559
565
static
const
String
CHARGE_DISTRIBUTION
;
566
572
static
const
String
DIELECTRIC_SMOOTHING
;
573
578
static
const
float
SOLVENT_DC
;
579
584
static
const
float
SOLUTE_DC
;
585
592
static
const
float
RMS_CRITERION
;
593
600
static
const
float
MAX_CRITERION
;
601
607
static
const
Index
MAX_ITERATIONS
;
608
613
static
const
Index
CHECK_AFTER_ITERATIONS
;
614
};
615
627
struct
BALL_EXPORT
FastAtomStruct
628
{
629
float
q
;
630
float
r
;
631
float
x, y,
z
;
632
Index
index
;
633
};
634
635
typedef
struct
FastAtomStruct
FastAtom
;
636
637
641
645
FDPB
();
646
650
FDPB
(
const
FDPB
& fdpb);
651
658
FDPB
(
System
& system);
659
666
FDPB
(
Options
& new_options);
667
675
FDPB
(
System
& system,
Options
& new_options);
676
679
virtual
~
FDPB
();
680
683
void
destroy();
684
693
void
destroyGrids();
694
696
701
721
bool
setup(
System
& system);
722
731
bool
setup(
System
& system,
Options
& options);
732
757
bool
setupEpsGrid(
System
& system);
758
759
760
// ?????
764
bool
setupSASGrid(
System
& system);
765
776
bool
setupAtomArray(
System
& system);
777
780
bool
setupKappaGrid();
781
784
bool
setupQGrid();
785
788
bool
setupPhiGrid();
789
792
bool
setupBoundary();
793
795
798
801
bool
solve();
802
810
double
getEnergy()
const
;
811
815
double
getReactionFieldEnergy()
const
;
816
820
double
calculateReactionFieldEnergy()
const
;
821
830
Size
getNumberOfIterations()
const
;
831
833
837
845
Index
getErrorCode()
const
;
846
851
static
String
getErrorMessage(
Index
error_code);
853
854
858
861
Options
options
;
862
865
Options
results
;
866
868
871
876
TRegularData3D<Vector3>
*
eps_grid
;
877
881
TRegularData3D<float>
*
kappa_grid
;
882
891
TRegularData3D<float>
*
q_grid
;
892
902
TRegularData3D<float>
*
phi_grid
;
903
906
TRegularData3D<char>
*
SAS_grid
;
907
911
vector<FDPB::FastAtom>*
atom_array
;
912
914
915
protected
:
916
917
Vector3
lower_
;
918
Vector3
upper_
;
919
Vector3
offset_
;
920
921
bool
use_offset_
;
922
923
float
spacing_
;
924
925
// final energy of the last calculation
926
double
energy_
;
927
928
// the reaction field energy of the last calculation
929
double
reaction_field_energy_
;
930
931
// the indices of the boundary points,
932
// i.e., the points that have at least one neighbouring
933
// grid point that is inside the solute
934
vector<Position>
boundary_points_
;
935
936
// number of iterations of the last calculation
937
Size
number_of_iterations_
;
938
939
// error code. use getErrorMessage to access the corresponding
940
// error message
941
int
error_code_
;
942
943
static
const
char
* error_message_[];
944
};
945
946
}
// namespace BALL
947
948
#endif
Generated by
1.8.3.1