pyvibdmc.simulation_utilities.Constants

Classes

Constants

Thanks, Mark Boyer, for this silly little class.

Functions

get_atomic_num(atms)

get_atomic_string(atomic_num)

Module Contents

pyvibdmc.simulation_utilities.Constants.get_atomic_num(atms)[source]
Parameters:

atms – A list (or single string) of atomic element symbols

Returns:

The atomic numbers of each of the atom strings you provide

pyvibdmc.simulation_utilities.Constants.get_atomic_string(atomic_num)[source]
Parameters:

atomic_num – The atomic numbers of each of the atom strings you provide

Returns:

A list of atomic element symbols

class pyvibdmc.simulation_utilities.Constants.Constants[source]

Thanks, Mark Boyer, for this silly little class. Converter that handles energy, distance, and mass conversions for DMC. Can be expanded upon.

atomic_units
classmethod convert(val, unit, to_AU=True)[source]
Parameters:
  • val (np.ndarray) – The value or values that will be converted

  • unit (str) – The units (not atomic units) that we will be converting to or from

  • to_AU – If true, converting from non-a.u. to a.u. If false, converting to a.u. from non-a.u.

:type to_AU:boolean :return: converted values

classmethod mass(atom, to_AU=True)[source]

Given a string that corresponds to an atomic element, output the atomic mass of that element :param atom: The string of an atomic element :type atom:str :param to_AU: If true, converting from non-a.u. to a.u. If false, converting to a.u. from non-a.u. :type to_AU:boolean :return: mass in atomic units unless user changes to_AU to False, then AMU

classmethod reduced_mass(atoms, to_AU=True)[source]

Given a string like ‘O-H’ or ‘N-N’ , output the reduced mass of that diatomic :param atoms: A string that is composed of two atoms :type atom:str :param to_AU: If true, converting from non-a.u. to a.u. If false, converting to a.u. from non-a.u. :type to_AU:boolean :return: mass in atomic units unless user changes to_AU to False, then AMU