energy
Class FDPoissonBoltzmann

java.lang.Object
  extended byenergy.FDPoissonBoltzmann
Direct Known Subclasses:
FDPoissonBoltzmann_Boundary, FDPoissonBoltzmann_ChargeGrid, FDPoissonBoltzmann_EpsGrid

public class FDPoissonBoltzmann
extends java.lang.Object


Field Summary
(package private)  Particles atoms
           
(package private)  boolean debug
           
protected  double[] epsCgrid
          epsCgrid[GPX*GPY*GPZ] stores the sum of the permittivities at the six faces plus @f$\varepsilon _{Solvent} \kappa ^2 h^2 @f$ times the number of solvent faces divided by six.
protected  double[] epsIgrid
          epsIgrid[GPX*GPY*GPZ] stores the permittivity surrounding each face of a gridpoint[I][J][K] shifted in direction I
protected  double[] epsJgrid
          epsJgrid[GPX*GPY*GPZ] stores the permittivity surrounding each face of a gridpoint[I][J][K] shifted in direction J
protected  double[] epsKgrid
          epsKgrid[GPX*GPY*GPZ] stores the permittivity surrounding each face of a gridpoint[I][J][K] shifted in direction K
protected static double epssolute
          solute permittivity
protected static double epssolvent
          solvent permittivity
(package private) static int GPX
          number of grid points along X.
(package private)  int GPXGPY
           
(package private)  int GPXGPYGPZ
           
(package private) static int GPY
          number of grid points along Y.
(package private) static int GPZ
          number of grid points along Z.
protected static double gridspacing
          gridspacing @f$ h @f$
protected static double[] gridstart
          grid origin
(package private)  boolean havephi
           
(package private)  FDPoissonBoltzmann_ICCG iccg
           
protected static double kappa
           
(package private)  FDPoissonBoltzmann_Boundary PBboundary
           
(package private)  FDPoissonBoltzmann_ChargeGrid PBcrgGrid
           
(package private)  FDPoissonBoltzmann_EpsGrid PBeps
           
protected  double[] phigrid
          phigrid[GPX*GPY*GPZ] will become the solution vector when solving for the electrostatic potential
protected  double[] rhogrid
          rhogrid[GPX*GPY*GPZ] stores the charges assigned to each grid point divided by the gridspacing @f$ h @f$
(package private)  SimSystem sys
           
 
Constructor Summary
FDPoissonBoltzmann()
          The PoissonBoltzmann default class constructor.
FDPoissonBoltzmann(FDPoissonBoltzmann_Parameters parameters, boolean debug)
           
FDPoissonBoltzmann(Particles atoms, SimSystem sys, boolean debug)
           
FDPoissonBoltzmann(Particles atoms, SimSystem sys, FDPoissonBoltzmann_Parameters parameters, boolean debug)
          The PoissonBoltzmann class constructor.
 
Method Summary
 void addParticles(Particles atoms, SimSystem sys)
           
 double[] dGelec(boolean green)
          public boolean dGelec calculates the electrostatic free energy [G] for the system from the electrostatic potential (phigrid) calculated above.
private  double getdG()
           
 double[] getgridstart()
           
 double[] getpotential()
           
(package private)  void gridcheck()
          static final void gridcheck checks whether any atom exceeds the grid
(package private)  int index(int x, int y, int z)
          static final int index converts 3D to 1D array index.
 void setpermittivity(double solute, double solvent)
          static setpermittivity.
 void setupGrid(FDPoissonBoltzmann_Parameters parameters, boolean newphi)
          public void method setupGrid sets up a grid around the solute particles using the center of geometry as the grid center, along with the given gridspacing, ionic strength, solute/solven permittivities and the number of gridpoints along X,Y and Z.
 boolean solveforpotential(int maxits, double acceptance)
          public boolean solveforpotential solves the linearized Poisson-Boltzmann equation for the electrostatic potential phigrid using the incomplete cholesky conjugate gradient algorithm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

atoms

Particles atoms

sys

SimSystem sys

GPX

static int GPX
number of grid points along X.


GPY

static int GPY
number of grid points along Y.


GPZ

static int GPZ
number of grid points along Z.


GPXGPY

final int GPXGPY

GPXGPYGPZ

final int GPXGPYGPZ

rhogrid

protected double[] rhogrid
rhogrid[GPX*GPY*GPZ] stores the charges assigned to each grid point divided by the gridspacing @f$ h @f$


epsIgrid

protected double[] epsIgrid
epsIgrid[GPX*GPY*GPZ] stores the permittivity surrounding each face of a gridpoint[I][J][K] shifted in direction I


epsJgrid

protected double[] epsJgrid
epsJgrid[GPX*GPY*GPZ] stores the permittivity surrounding each face of a gridpoint[I][J][K] shifted in direction J


epsKgrid

protected double[] epsKgrid
epsKgrid[GPX*GPY*GPZ] stores the permittivity surrounding each face of a gridpoint[I][J][K] shifted in direction K


epsCgrid

protected double[] epsCgrid
epsCgrid[GPX*GPY*GPZ] stores the sum of the permittivities at the six faces plus @f$\varepsilon _{Solvent} \kappa ^2 h^2 @f$ times the number of solvent faces divided by six. This corresponds to the diagonal elements of the coefficient matrix A.


phigrid

protected double[] phigrid
phigrid[GPX*GPY*GPZ] will become the solution vector when solving for the electrostatic potential


gridspacing

protected static double gridspacing
gridspacing @f$ h @f$


epssolute

protected static double epssolute
solute permittivity


epssolvent

protected static double epssolvent
solvent permittivity


gridstart

protected static double[] gridstart
grid origin


kappa

protected static double kappa

PBboundary

FDPoissonBoltzmann_Boundary PBboundary

PBcrgGrid

FDPoissonBoltzmann_ChargeGrid PBcrgGrid

PBeps

FDPoissonBoltzmann_EpsGrid PBeps

iccg

FDPoissonBoltzmann_ICCG iccg

debug

final boolean debug

havephi

boolean havephi
Constructor Detail

FDPoissonBoltzmann

public FDPoissonBoltzmann()
The PoissonBoltzmann default class constructor.


FDPoissonBoltzmann

public FDPoissonBoltzmann(Particles atoms,
                          SimSystem sys,
                          boolean debug)

FDPoissonBoltzmann

public FDPoissonBoltzmann(FDPoissonBoltzmann_Parameters parameters,
                          boolean debug)

FDPoissonBoltzmann

public FDPoissonBoltzmann(Particles atoms,
                          SimSystem sys,
                          FDPoissonBoltzmann_Parameters parameters,
                          boolean debug)
The PoissonBoltzmann class constructor.

Parameters:
atoms - Particles in the system
sys - the SimSystem to be used
Method Detail

addParticles

public void addParticles(Particles atoms,
                         SimSystem sys)

setupGrid

public void setupGrid(FDPoissonBoltzmann_Parameters parameters,
                      boolean newphi)
public void method setupGrid sets up a grid around the solute particles using the center of geometry as the grid center, along with the given gridspacing, ionic strength, solute/solven permittivities and the number of gridpoints along X,Y and Z.

See Also:
PositionUtils, FDPoissonBoltzmann_Boundary, FDPoissonBoltzmann_ChargeGrid, FDPoissonBoltzmann_EpsGrid

solveforpotential

public boolean solveforpotential(int maxits,
                                 double acceptance)
public boolean solveforpotential solves the linearized Poisson-Boltzmann equation for the electrostatic potential phigrid using the incomplete cholesky conjugate gradient algorithm

Parameters:
maxits - maximum number of iterations
acceptance - acceptance criterion for the norm of the residual
See Also:
jpb_solver_Math

dGelec

public double[] dGelec(boolean green)
public boolean dGelec calculates the electrostatic free energy [G] for the system from the electrostatic potential (phigrid) calculated above. It is possible to obtain an estimate of the electrostatic solvation free energy difference dGsolv by substracting the finite-difference Coulombic and self-energy correction in a medium of uniform dielectric permittivity (Green functions correction).

Parameters:
green - boolean to determine whether Green functions correction is applied or not.
See Also:
FDPoissonBoltzmann_GreenFunction

getdG

private final double getdG()

gridcheck

final void gridcheck()
static final void gridcheck checks whether any atom exceeds the grid


index

final int index(int x,
                int y,
                int z)
static final int index converts 3D to 1D array index.

Parameters:
x - index along x
y - index along y
z - index along z

setpermittivity

public void setpermittivity(double solute,
                            double solvent)
static setpermittivity.

Parameters:
solute - solute permittivity
solvent - solvent permittivity

getpotential

public double[] getpotential()

getgridstart

public double[] getgridstart()