Collection: PCM

class h2tools.collections.pcm.PCM_Data(count, collocation, area, normal, atom_count, atom_position, atom_charge, eps)

Methods to find desolvation energy of molecule.

Contains molecule surface as a number of discrete elements, each represented by collocation point with area and normal, and a number of molecule atoms, represented by coordinates and charges. Also, contains routines to solve integral equation and find solvation energy in the framework of polarized continuum model (PCM).

Parameters:

count : int

Number of discrete elements.

collocation : 2-dimensional array

Coordinates of collocation points. Shape is (3, count).

area : 1-dimensional array

Area of each discrete element.

normal : 2-dimensional array

Normals for each discrete element. Shape is (3, count).

atom_count : int

Number of atoms.

atom_position : 2-dimensional array.

Radius vectors of atoms. Shape is (3, atom_count).

atom_charge : 1-dimensional array.

Values of charges of each atom in molecule.

eps : float

Permittivity of solvent.

check_far(self_aux, other_aux)

Checks if two bounding boxes are far or close.

If maximum diagonal of bounding boxes is larger, than distance between centers of bounding boxes, then bounding boxes are assumed to be far and function returns True.

Parameters:

self_aux, other_aux : numpy.ndarray of shape (2, ndim)

Each bounding box contains minimum values of corresponding coordinates in [0,:] and maximum values of corresponding coordinates in [1,:].

Returns:

boolean

True if bounding boxes are far, False otherwise.

compute_aux(index)

Computes bounding box of cluster, corresponding to index.

compute_diag(matrix)

Computes diagonal of a matrix by special integral identity.

compute_qtd(max_items=100000000)

Computes auxiliary value, required to find solvation energy.

compute_rhs(max_items=100000000)

Computes right hand side to find solvation energy.

divide(index)

Divides cluster, corresponding to indexes index.

Clusters is divided by inertial bisection procedure, applied to collocation points of discrete elements.

find_solvation_energy(eps=1e-06, block_size=25, onfly=True, maxiter=999, verbose=False)

Computes solvation energy of a given molecule.

Parameters:

eps : float

Relative tolerance.

block_size : int

Maximum size of leaf nodes in cluster tree.

onfly : boolean

If True, does not store some submatrices (saves a lot of memory, but each matrix-vector operation requires computation of these submatrices on demand).

maxiter : int

Maximum number of iterations for GMRES.

verbose : boolean

If True, MCBH factorization will produce additional output.

Returns:

float

Solvation energy of molecule.

static from_file(fname, eps)

Reads molecule configuration from file.

Format of input file is following: first line contains number of atoms, each following line contains 3 coordinates and charge of atom (split by space), then first line after row with last atom contains number of discrete surface elements, followed by rows, containing 3 coordinates, 3 coordinates of normal and area for each discrete element. Permittivity of solvent is given by eps parameter.

Parameters:

fname : string

Name of file to read.

eps : float

Permittivity of solvent.

h2tools.collections.pcm.electro(data1, list1, data2, list2)

Interactions of discrete elements of surface of molecule.

h2tools.collections.pcm.energy(data1, list1, data2, list2)

Auxiliary interactions of discrete elements and atoms of molecule.

h2tools.collections.pcm.rhs(data1, list1, data2, list2)

Interactions of discrete elements of surface and atoms of molecule.