NonuniformGridConjugateGradientSolver

class NonuniformGridConjugateGradientSolver(fine_grid_extension=None, scaling_factor=None, boundary_conditions=None, solvent_dielectric_constant=None, gpu_acceleration=None)

A conjugate gradient-based Poisson solver for gated reduced dimensional systems. The solver uses a fine grid in the region determined by the atomic coordinates, and the support of the basis set. An increasingly coarser grid outside of this region is then used in the transverse directions to calculate the potential more efficiently. The solver assumes that the system has vacuum along at least one of the transverse directions. The fine grid region can be extended by specifying values for fine_grid_extension.

Moreover, the solver only supports orthorhombic cells.

Parameters:
  • fine_grid_extension (PhysicalQuantity of type length | list of PhysicalQuantity of type length) – An extension of the fine grid region, where the grid spacing is uniform, specified in units of length. The extension can be a single value; in that case the same value is used for both A and B directions, or a list specifying different values for A and B. The value of this parameter is subtracted from the bottom edge of the fine grid region, and added to its top edge.
    Default: 5% of the lattice vector length along each transverse direction.

  • scaling_factor (PhysicalQuantity of type inverse length | list of PhysicalQuantity of type inverse length) –

    The scaling factor of the non-uniform region. The factor can be a single value; in that case the same value is used for both A and B directions, or a list specifying different values for A and B. The grid spacing in the nonuniform grid region with respect to the grid spacing in the uniform region increases approximately as:

    \(\frac{\Delta x_{non-uniform}}{\Delta x_{uniform}} \approx s d + 1\),

    where \(s\) is the scaling factor, \(d\) the distance from the fine grid region and \(\Delta x_{uniform}\) the uniform grid spacing as determined by the parameter density_mesh_cutoff in NumericalAccuracyParameters. In the limit \(s \rightarrow 0\) the uniform grid spacing is recovered everywhere. Note that a too large scaling factor might severely reduce the quality of the results.
    Default: [0.05, 0.05] * Angstrom**(-1)

  • boundary_conditions (list of DirichletBoundaryCondition | NeumannBoundaryCondition | PeriodicBoundaryCondition | MultipoleBoundaryCondition) –

    A list o lists of shape (3,2) specifying the boundary conditions on the 6 surfaces of the unit cell for the configuration.
    Default: - BulkConfiguration:

    [[PeriodicBoundaryCondition()] * 2,
     [PeriodicBoundaryCondition()] * 2,
     [PeriodicBoundaryCondition()] * 2]
    
    • SurfaceConfiguration:

      [[PeriodicBoundaryCondition()] * 2,
       [PeriodicBoundaryCondition()] * 2,
       [DirichletBoundaryCondition(), NeumannBoundaryCondition()]]
      
    • DeviceConfiguration:

      [[PeriodicBoundaryCondition()] * 2,
       [PeriodicBoundaryCondition()] * 2,
       [DirichletBoundaryCondition()] * 2]
      

  • solvent_dielectric_constant (float) – The dielectric constant of the media surrounding the configuration. Must be a number larger than 0.
    Default: 1.0

  • gpu_acceleration (Enabled | Disabled | Automatic) – Whether to use GPU acceleration. If set to Automatic, the solver will use the GPU if available.
    Default: Automatic

boundaryConditions()
Returns:

The boundary conditions for the solver.

Return type:

list of DirichletBoundaryCondition | NeumannBoundaryCondition | PeriodicBoundaryCondition | MultipoleBoundaryCondition

fineGridExtension()
Returns:

The extension of the fine grid region along the transverse directions, in units of length. If None, the extension will be determined automatically from the configuration’s lattice.

Return type:

list of PhysicalQuantity of type length | None

gpuAcceleration()
Returns:

The GPU acceleration flag.

Return type:

Enabled | Disabled | Automatic

nlinfo()
Returns:

The nlinfo.

Return type:

dict

scalingFactor()
Returns:

The scaling factor of the non-uniform region of the grid along the transverse directions.

Return type:

list of PhysicalQuantity of type inverse length

solventDielectricConstant()
Returns:

The solvent dielectric constant.

Return type:

float

uniqueString()

Return a unique string representing the state of the object.