Name

MultigridSolver — Class for representing a multigrid-based Poisson solver.

Synopsis

Namespace: NanoLanguage
MultigridSolver(
boundary_conditions,
solvent_dielectric_constant,
use_new_solver
)

Description

Constructor for a multigrid-based Poisson solver.

MultigridSolver Arguments

boundary_conditions

The boundary conditions for the multigrid solver.

Type: A list of shape (3,2) specifying the boundary conditions on the 6 surfaces of the unit cell for the configuration. If boundary conditions on opposite faces are the same the list can also be specified as shape(3). Valid boundary conditions are: MultipoleBoundaryCondition | DirichletBoundaryCondition| NeumannBoundaryCondition | PeriodicBoundaryCondition

Default: BulkConfiguration=[[PeriodicBoundaryCondition]*2]*3, MoleculeConfiguration=[[MultipoleBoundaryCondition]*2]*3, DeviceConfiguration=[[PeriodicBoundaryCondition]*2, [PeriodicBoundaryCondition]*2, [DirichletBoundaryCondition]*2]
solvent_dielectric_constant

The dielectric constant of the media surrounding the configuration.

Type: float > 0.0

Default: 1.0
use_new_solver

Use the newly developed Multigrid solver, rather than the older Trilinos-based solver.

Type: bool

Default: True

MultigridSolver Methods

A MultigridSolver object provides the following methods:

  • This object supports cloning. See the section called “Cloning of ATK Python objects”.

  • boundaryConditions(): Query method to obtain boundary conditions.

  • solventDielectricConstant(): Query method to obtain the solvent dielectric constant.

  • useNewSolver(): Query method to determine if we want to use the new solver.

Usage Examples

Define a Multi-grid solver with specified boundary conditions on the 6 faces

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

calculator = HuckelCalculator(poisson_solver=poisson_solver)

Define a Multi-grid solver 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,
                         PeriodicBoundaryCondition ]
    )

calculator = HuckelCalculator(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 section called “The Hartree Potential”