boltzkit.utils.molecular.conversion

Functions

numpy_to_vec3_list(pos)

Convert numpy position vector in nanometers into list openmm Vec3 entries.

to_free_energy(hist[, shift_min])

Convert histogram counts into free energy values (in units of kT).

vec3_list_to_numpy(pos)

boltzkit.utils.molecular.conversion.numpy_to_vec3_list(pos: ndarray) list[Vec3][source]

Convert numpy position vector in nanometers into list openmm Vec3 entries.

Parameters:

pos (np.ndarray) – Position array of shape (n, 3)

Returns:

Single molecule atom positions

Return type:

list[mm.Vec3]

boltzkit.utils.molecular.conversion.vec3_list_to_numpy(pos: list[Vec3]) ndarray[source]
boltzkit.utils.molecular.conversion.to_free_energy(hist: ndarray, shift_min: bool = False) ndarray[source]

Convert histogram counts into free energy values (in units of kT). Normalization of hist is not important as this function normalizes them.

Parameters:
  • hist (np.ndarray) – Histogram counts.

  • shift_min (bool, optional) – If True, shifts the minimum free energy to zero.

Returns:

Free energy values corresponding to histogram counts.

Return type:

np.ndarray