BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
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 {
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 
67 
75 
85 
94 
102 
110 
118 
127 
135 
144 
151 
161 
170 
179 
188 
198 
205 
208  NUMBER_OF_ERRORS
209  };
210 
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 
318 
330 
338  static const String OFFSET;
339 
348  static const String RMS_CRITERION;
349 
357  static const String MAX_CRITERION;
358 
366 
375  static const String MAX_ITERATIONS;
376 
385  static const String LOWER;
386 
391  static const String UPPER;
392 
399 
405 
406  };
407 
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 
454  {
458  static const String TRILINEAR;
459 
463  static const String UNIFORM;
464  };
465 
473  {
476  static const String NONE;
477 
485  static const String UNIFORM;
486 
494  static const String HARMONIC;
495  };
496 
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 
566 
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 
614  };
615 
628  {
629  float q;
630  float r;
631  float x, y, z;
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 
862 
866 
868 
871 
877 
882 
892 
903 
907 
911  vector<FDPB::FastAtom>* atom_array;
912 
914 
915  protected:
916 
920 
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
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
938 
939  // error code. use getErrorMessage to access the corresponding
940  // error message
942 
943  static const char* error_message_[];
944  };
945 
946 } // namespace BALL
947 
948 #endif
static const String BOUNDARY
TRegularData3D< float > * kappa_grid
TRegularData3D< Vector3 > * eps_grid
static const String CHARGE_DISTRIBUTION
TRegularData3D< float > * q_grid
static const String BORDER
static const String LOWER
static const String ZERO
static const int VERBOSITY
static const float MAX_CRITERION
static const String PRINT_TIMING
static const String VERBOSITY
static const float SPACING
static const float ION_RADIUS
static const String BOUNDARY
static const float PROBE_RADIUS
static const Index CHECK_AFTER_ITERATIONS
static const bool PRINT_TIMING
static const float RMS_CRITERION
static const float TEMPERATURE
static const String FOCUSING
static const String MAX_ITERATIONS
static const String DEBYE
static const String RMS_CRITERION
static const String COULOMB
static const String MAX_CRITERION
static const float IONIC_STRENGTH
double reaction_field_energy_
static const String IONIC_STRENGTH
static const String TEMPERATURE
vector< Position > boundary_points_
static const String SPACING
static const String BOUNDING_BOX_UPPER
static const float SOLUTE_DC
static const String SOLVENT_DC
static const String CHARGE_DISTRIBUTION
static const String BOUNDING_BOX_LOWER
static const Index MAX_ITERATIONS
static const String CHECK_AFTER_ITERATIONS
Size number_of_iterations_
TRegularData3D< char > * SAS_grid
static const String DIELECTRIC_SMOOTHING
static const String SOLUTE_DC
static const String OFFSET
static const float SOLVENT_DC
static const String PROBE_RADIUS
static const String ION_RADIUS
vector< FDPB::FastAtom > * atom_array
static const String UPPER
TRegularData3D< float > * phi_grid
static const float BORDER
static const String DIELECTRIC_SMOOTHING
#define BALL_EXPORT
Definition: COMMON/global.h:50
static const String DIPOLE