MultigridSolver

class MultigridSolver(boundary_conditions=None, solvent_dielectric_constant=None)

The multigrid-based Poisson solver.

Parameters:
boundaryConditions()
Returns:The boundary conditions for the solver.
Return type:list of DirichletBoundaryCondition | NeumannBoundaryCondition | PeriodicBoundaryCondition | MultipoleBoundaryCondition
solventDielectricConstant()
Returns:The solvent dielectric constant.
Return type:float

Usage Examples

Define a MultigridSolver with specified boundary conditions on the 6 faces:

poisson_solver = MultigridSolver(
    boundary_conditions=[
        [DirichletBoundaryCondition(), NeumannBoundaryCondition()],
        [DirichletBoundaryCondition(), DirichletBoundaryCondition()],
        [PeriodicBoundaryCondition(), PeriodicBoundaryCondition()]
    ]
)

calculator = LCAOCalculator(
    poisson_solver=poisson_solver
)

Define a MultigridSolver with specified boundary conditions in the A, B, and C-direction, but similar boundary conditions on opposite faces.:

poisson_solver = MultigridSolver(
    boundary_conditions=[
        [DirichletBoundaryCondition(), DirichletBoundaryCondition()],
        [DirichletBoundaryCondition(), DirichletBoundaryCondition()],
        [PeriodicBoundaryCondition(), PeriodicBoundaryCondition()]
    ]
)

calculator = LCAOCalculator(
    poisson_solver=poisson_solver,
)

Notes

  • By setting the solvent_dielectric_constant it is possible to perform calculations of solvents. In this case the volume of the configuration is defined by inscribing each atom in a sphere of size given by the van der Waals radius of the element. Inside the volume of the configuration the dielectric constant is 1, outside the volume of the configuration the dielectric constant is equal to the value of solvent_dielectric_constant.
  • See also The Hartree Potential.