API Reference

class CPET.source.calculator.calculator(options, path_to_pdb=None)

Bases: object

Initialize the calculator object with the following parameters

Parameters:
  • options (dict) – Dictionary from input options.json file

  • path_to_pdb (str, optional) – Path to the PDB file, by default None

Variables:
  • self.profile (Bool) – If True, the calculator will profile the code (development, intended for GPU)

  • self.path_to_pdb (str) – Path to the PDB file

  • self.step_size (float) – Step size for the electric field calculation, relevant for the topology calculation or volume field calcs

  • self.dimensions (list) – Dimensions of the box for the electric field/topology calculations

  • self.n_samples (int) – Number of streamlines used for the topology calculation

  • self.max_streamline_init (str) – Method for determining when streamlines end

  • self.concur_slip (int) – Number of concurrent processes for the CPU-accelerated topology calculation

  • self.GPU_batch_freq (int) – Number of batches for the GPU-accelerated topology calculation

  • self.dtype (str) – Data type for the calculations (float32 or float64)

compute_box()

Compute the electric field on a grid defined by the mesh and the charges Q at positions x.

Returns:

  • field_box (np.ndarray) – The computed electric field on the grid

  • mesh.shape (tuple) – The shape of the mesh grid

compute_box_ESP()

Compute the electrostatic potential on a grid defined by the mesh and the charges Q at positions x.

Returns:

  • esp_box (np.ndarray) – The computed electrostatic potential on the grid

  • mesh.shape (tuple) – The shape of the mesh grid

compute_box_QM()

Compute the electric field on a grid, generated from QM calculations with optional MM embedding. Defined by mesh, density, and charges Q at position x.

Returns:

  • field_box (np.ndarray) – The computed electric field on the grid

  • mesh.shape (tuple) – The shape of the mesh grid

compute_point_field()

Compute the electric field at a point defined by the center and the charges Q at positions x.

Returns:

point_field – The computed electric field at the point

Return type:

np.ndarray

compute_point_field_polarizable()

Compute the electric field at a point defined by the center and multipole moments T at positions x.

Returns:

point_field – The computed electric field at the point

Return type:

np.ndarray

compute_point_mag()

Compute the electric field magnitude at a point defined by the center and the charges Q at positions x.

Returns:

point_mag – The computed electric field magnitude at the point

Return type:

np.ndarray

compute_topo()
compute_topo_GPU_batch_filter()

Compute the topology using GPU with batch-filtering

Returns:

hist – The computed topology data

Return type:

np.ndarray

compute_topo_base()
compute_topo_batched()
compute_topo_complete_c_shared()
compute_topo_complete_c_shared_dipole()

IN DEVELOPMENT, FOR TESTING ONLY

compute_topo_single()