helpme_py.PMEInstanceF

class helpme_py.PMEInstanceF

An object that performs various calculations.

__init__(self: helpme_py.PMEInstanceF) None

Methods

__init__(self)

compute_EFV_adj(self, pair_list, ...)

Computes the adjusted real-space energy, forces, and virial.

compute_EFV_all(self, included_list, ...)

Computes the full (real- and reciprocal-space) energy, forces, and virial.

compute_EFV_dir(self, pair_list, ...)

Computes the direct real-space energy, forces, and virial.

compute_EFV_rec(self, parameter_ang_mom, ...)

Computes the reciprocal-space energy, forces, and virial using PME.

compute_EF_adj(self, pair_list, ...)

Computes the adjusted real-space energy and forces.

compute_EF_all(self, included_list, ...)

Computes the full (real- and reciprocal-space) energy and forces.

compute_EF_dir(self, pair_list, ...)

Computes the direct real-space energy and forces.

compute_EF_rec(self, parameter_ang_mom, ...)

Computes the reciprocal-space energy and forces using PME.

compute_E_adj(self, pair_list, ...)

Computes the adjusted real-space energy.

compute_E_all(self, included_list, ...)

Computes the full (real- and reciprocal-space) energy.

compute_E_dir(self, pair_list, ...)

Computes the direct real-space energy.

compute_E_rec(self, parameter_ang_mom, ...)

Computes the reciprocal-space energy using PME.

compute_E_self(self, parameter_ang_mom, ...)

Computes the Ewald self interaction energy.

compute_PDP_adj(self, parameter_ang_mom, ...)

Computes the adjusted real-space potential and its first-derivative at a set of points.

compute_P_adj(self, parameter_ang_mom, ...)

Computes the adjusted real-space potential at a set of points.

compute_P_rec(self, parameter_ang_mom, ...)

Computes the reciprocal-space potential and derivatives at a set of points.

set_lattice_vectors(self, a, b, c, alpha, ...)

Sets the unit cell lattice vectors.

setup(self, r_power, kappa, spline_order, ...)

Initializes this object for a PME calculation.

setup_compressed(self, r_power, kappa, ...)

Initializes this object for a compressed PME calculation.

compute_EFV_adj(self: helpme_py.PMEInstanceF, pair_list: helpme_py.PairList, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, forces: helpme_py.MatrixF, virial: helpme_py.MatrixF) float

Computes the adjusted real-space energy, forces, and virial.

This method extracts the energy, forces, and virial for excluded pairs that is present in reciprocal space. This is provided mostly for debugging and testing purposes; generally, the host program should provide the pairwise interactions.

Parameters:
  • pair_list – A dense list of atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • forces – An Nx3 matrix of the forces. This matrix is incremented, not assigned.

  • virial – A vector of length 6 containing the unique virial elements, in the order XX XY YY XZ YZ ZZ. This vector is incremented, not assigned.

Returns:

The adjusted real-space energy.

compute_EFV_all(self: helpme_py.PMEInstanceF, included_list: helpme_py.PairList, excluded_list: helpme_py.PairList, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, forces: helpme_py.MatrixF, virial: helpme_py.MatrixF) float

Computes the full (real- and reciprocal-space) energy, forces, and virial.

This is provided mostly for debugging and testing purposes; generally, the host program should provide the pairwise interactions.

Parameters:
  • included_list – A dense list of real-space included atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • excluded_list – A dense list of real-space excluded atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • forces – An Nx3 matrix of the forces. This matrix is incremented, not assigned.

  • virial – A vector of length 6 containing the unique virial elements, in the order XX XY YY XZ YZ ZZ. This vector is incremented, not assigned.

Returns:

The full energy.

compute_EFV_dir(self: helpme_py.PMEInstanceF, pair_list: helpme_py.PairList, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, forces: helpme_py.MatrixF, virial: helpme_py.MatrixF) float

Computes the direct real-space energy, forces, and virial.

This is provided mostly for debugging and testing purposes; generally, the host program should provide the pairwise interactions.

Parameters:
  • pair_list – A dense list of atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • forces – An Nx3 matrix of the forces. This matrix is incremented, not assigned.

  • virial – A vector of length 6 containing the unique virial elements, in the order XX XY YY XZ YZ ZZ. This vector is incremented, not assigned.

Returns:

The direct real-space energy.

compute_EFV_rec(self: helpme_py.PMEInstanceF, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, forces: helpme_py.MatrixF, virial: helpme_py.MatrixF) float

Computes the reciprocal-space energy, forces, and virial using PME.

Parameters:
  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • forces – An Nx3 matrix of the forces. This matrix is incremented, not assigned.

  • virial – A vector of length 6 containing the unique virial elements, in the order XX XY YY XZ YZ ZZ. This vector is incremented, not assigned.

Returns:

The reciprocal-space energy.

compute_EF_adj(self: helpme_py.PMEInstanceF, pair_list: helpme_py.PairList, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, forces: helpme_py.MatrixF) float

Computes the adjusted real-space energy and forces.

This method extracts the energy and forces for excluded pairs that is present in reciprocal space. This is provided mostly for debugging and testing purposes; generally, the host program should provide the pairwise interactions.

Parameters:
  • pair_list – A dense list of atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • forces – An Nx3 matrix of the forces. This matrix is incremented, not assigned.

Returns:

The adjusted real-space energy.

compute_EF_all(self: helpme_py.PMEInstanceF, included_list: helpme_py.PairList, excluded_list: helpme_py.PairList, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, forces: helpme_py.MatrixF) float

Computes the full (real- and reciprocal-space) energy and forces.

This is provided mostly for debugging and testing purposes; generally, the host program should provide the pairwise interactions.

Parameters:
  • included_list – A dense list of real-space included atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • excluded_list – A dense list of real-space excluded atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • forces – An Nx3 matrix of the forces. This matrix is incremented, not assigned.

Returns:

The full energy.

compute_EF_dir(self: helpme_py.PMEInstanceF, pair_list: helpme_py.PairList, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, forces: helpme_py.MatrixF) float

Computes the direct real-space energy and forces.

This is provided mostly for debugging and testing purposes; generally, the host program should provide the pairwise interactions.

Parameters:
  • pair_list – A dense list of atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • forces – An Nx3 matrix of the forces. This matrix is incremented, not assigned.

Returns:

The direct real-space energy.

compute_EF_rec(self: helpme_py.PMEInstanceF, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, forces: helpme_py.MatrixF) float

Computes the reciprocal-space energy and forces using PME.

Parameters:
  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • forces – An Nx3 matrix of the forces. This matrix is incremented, not assigned.

Returns:

The reciprocal-space energy.

compute_E_adj(self: helpme_py.PMEInstanceF, pair_list: helpme_py.PairList, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF) float

Computes the adjusted real-space energy.

This method extracts the energy for excluded pairs that is present in reciprocal space. This is provided mostly for debugging and testing purposes; generally, the host program should provide the pairwise interactions.

Parameters:
  • pair_list – A dense list of atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

Returns:

The adjusted real-space energy.

compute_E_all(self: helpme_py.PMEInstanceF, included_list: helpme_py.PairList, excluded_list: helpme_py.PairList, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF) float

Computes the full (real- and reciprocal-space) energy.

This is provided mostly for debugging and testing purposes; generally, the host program should provide the pairwise interactions.

Parameters:
  • included_list – A dense list of real-space included atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • excluded_list – A dense list of real-space excluded atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

Returns:

The full energy.

compute_E_dir(self: helpme_py.PMEInstanceF, pair_list: helpme_py.PairList, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF) float

Computes the direct real-space energy.

This is provided mostly for debugging and testing purposes; generally, the host program should provide the pairwise interactions.

Parameters:
  • pair_list – A dense list of atom pairs, ordered like i1, j1, i2, j2, i3, j3, … iN, jN.

  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

Returns:

The direct real-space energy.

compute_E_rec(self: helpme_py.PMEInstanceF, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF) float

Computes the reciprocal-space energy using PME.

Parameters:
  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

Returns:

The reciprocal-space energy.

compute_E_self(self: helpme_py.PMEInstanceF, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF) float

Computes the Ewald self interaction energy.

Parameters:
  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.).

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

Returns:

The self energy.

compute_PDP_adj(self: helpme_py.PMEInstanceF, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, grid_points: helpme_py.MatrixF, potential: helpme_py.MatrixF, minimum_image: bool) None

Computes the adjusted real-space potential and its first-derivative at a set of points.

Parameters:
  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.). A negative value indicates that only the shell with |parameter_ang_mom| is to be considered, e.g. a value of -2 specifies that only quadrupoles (and not dipoles or charges) will be provided; the input matrix should have dimensions corresponding only to the number of terms in this shell.

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • grid_points – An Mx3 matrix of cartesian coordinates at which the potential is needed; this can be the same as the coordinates.

  • potential – The array holding the potential. This is a matrix of dimensions nGridPoints x 4. This matrix is incremented, not assigned.

  • minimum_image – Whether or not to use the minimum image convection when calculating the potential.

compute_P_adj(self: helpme_py.PMEInstanceF, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, grid_points: helpme_py.MatrixF, potential: helpme_py.MatrixF, minimum_image: bool) None

Computes the adjusted real-space potential at a set of points.

Parameters:
  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.). A negative value indicates that only the shell with |parameter_ang_mom| is to be considered, e.g. a value of -2 specifies that only quadrupoles (and not dipoles or charges) will be provided; the input matrix should have dimensions corresponding only to the number of terms in this shell.

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • grid_points – An Mx3 matrix of cartesian coordinates at which the potential is needed; this can be the same as the coordinates.

  • potential – The array holding the potential. This is a matrix of dimensions nGridPoints x 1. This matrix is incremented, not assigned.

  • minimum_image – Whether or not to use the minimum image convection when calculating the potential.

compute_P_rec(self: helpme_py.PMEInstanceF, parameter_ang_mom: SupportsInt, parameters: helpme_py.MatrixF, coordinates: helpme_py.MatrixF, grid_points: helpme_py.MatrixF, derivative_level: SupportsInt, potential: helpme_py.MatrixF) None

Computes the reciprocal-space potential and derivatives at a set of points.

Parameters:
  • parameter_ang_mom – The angular momentum of the parameters (0 for charges, C6 coefficients, 2 for quadrupoles, etc.). A negative value indicates that only the shell with |parameter_ang_mom| is to be considered, e.g. a value of -2 specifies that only quadrupoles (and not dipoles or charges) will be provided; the input matrix should have dimensions corresponding only to the number of terms in this shell.

  • parameters

    The list of parameters associated with each atom (charges, C6 coefficients, multipoles, etc…). For a parameter with angular momentum L, a matrix of dimension nAtoms x nL is expected, where nL = (L+1)*(L+2)*(L+3)/6 and the fast running index nL has the ordering:

    0 X Y Z XX XY YY XZ YZ ZZ XXX XXY XYY YYY XXZ XYZ YYZ XZZ YZZ ZZZ …

    i.e. generated by the python loops:

    for L in range(maxAM+1):
        for Lz in range(0,L+1):
            for Ly in range(0, L - Lz + 1):
                Lx  = L - Ly - Lz
    

  • coordinates – An Nx3 matrix of cartesian coordinates.

  • grid_points – An Mx3 matrix of cartesian coordinates at which the potential is needed; this can be the same as the coordinates.

  • derivative_level – The order of the potential derivatives required; 0 is the potential, 1 is (minus) the field, etc. A negative value indicates that only the derivative with order |derivative_level| is to be generated, e.g. -2 specifies that only the second derivative (not the potential or its gradient) will be returned as output. The output matrix should have space for only these terms, accordingly.

  • potential – The array holding the potential. This is a matrix of dimensions nGridPoints x nD, where nD is the derivative level requested. See the details for the parameters argument for information about ordering of derivative components. This matrix is incremented, not assigned.

set_lattice_vectors(self: helpme_py.PMEInstanceF, a: SupportsFloat, b: SupportsFloat, c: SupportsFloat, alpha: SupportsFloat, beta: SupportsFloat, gamma: SupportsFloat, orientation: helpme_py.LatticeType) None

Sets the unit cell lattice vectors.

The units of the length parameters should be consistent with those used to specify coordinates.

Parameters:
  • a – The first length lattice parameter.

  • b – The second length lattice parameter.

  • c – The third length lattice parameter.

  • alpha – The first angle lattice parameter, in degrees.

  • beta – The second angle lattice parameter, in degrees.

  • gamma – The third angle lattice parameter, in degrees.

  • orientation – The orientation of the lattice vectors.

setup(self: helpme_py.PMEInstanceF, r_power: SupportsInt, kappa: SupportsFloat, spline_order: SupportsInt, a_dim: SupportsInt, b_dim: SupportsInt, c_dim: SupportsInt, scale_factor: SupportsFloat, n_threads: SupportsInt) None

Initializes this object for a PME calculation.

This method may be called repeatedly without compromising performance.

Parameters:
  • r_power – The exponent of the (inverse) distance kernel (e.g. 1 for Coulomb, 6 for attractive dispersion).

  • kappa – The attenuation parameter in units inverse of those used to specify coordinates.

  • spline_order – The order of B-spline; must be at least (2 + max. multipole order + deriv. level needed).

  • a_dim – The dimension of the FFT grid along the A axis.

  • b_dim – The dimension of the FFT grid along the B axis.

  • c_dim – The dimension of the FFT grid along the C axis.

  • scale_factor – A scale factor to be applied to all computed energies and derivatives thereof (e.g. the 1 / [4 pi epslion0] for Coulomb calculations).

  • n_threads – The maximum number of threads to use for each MPI instance; if set to 0 all available threads are used.

setup_compressed(self: helpme_py.PMEInstanceF, r_power: SupportsInt, kappa: SupportsFloat, spline_order: SupportsInt, a_dim: SupportsInt, b_dim: SupportsInt, c_dim: SupportsInt, max_ka: SupportsInt, max_kb: SupportsInt, max_kc: SupportsInt, scale_factor: SupportsFloat, n_threads: SupportsInt) None

Initializes this object for a compressed PME calculation.

This may be called repeatedly without compromising performance.

Parameters:
  • r_power – The exponent of the (inverse) distance kernel (e.g. 1 for Coulomb, 6 for attractive dispersion).

  • kappa – The attenuation parameter in units inverse of those used to specify coordinates.

  • spline_order – The order of B-spline; must be at least (2 + max. multipole order + deriv. level needed).

  • a_dim – The dimension of the FFT grid along the A axis.

  • b_dim – The dimension of the FFT grid along the B axis.

  • c_dim – The dimension of the FFT grid along the C axis.

  • max_ka – The maximum K value in the reciprocal sum along the A axis.

  • max_kb – The maximum K value in the reciprocal sum along the B axis.

  • max_kc – The maximum K value in the reciprocal sum along the C axis.

  • scale_factor – A scale factor to be applied to all computed energies and derivatives thereof (e.g. the 1 / [4 pi epslion0] for Coulomb calculations).

  • n_threads – The maximum number of threads to use for each MPI instance; if set to 0 all available threads are used.