Skip to main content

DiPolMol: tools for calculating molecular dipole moments, polarisabilities, and Hamiltonians

Project description

DiPolMol-Py

A Python package to calculate the rotational and hyperfine structure of doublet-Sigma molecules (e.g., CaF, BaF, SrF) in the presence of external fields.

DiPolMol-Py is licensed under a BSD 3 clause license, a copy can be found `See the LICENSE file'. If you use our work for academic purposes you can cite us using:

B.Humphreys et al. DiPolMol-Py: A Python package for calculations for $^{2}{\Sigma}$ ground-state molecules (https://arxiv.org/pdf/2503.21663).

Installation

run: pip install dipolmol

This installs the latest stable release and all required dependencies.

Package structure

Programme Files:

Hamiltonian – used to build the required Hamiltonian using matrix representation, including the field-free Hamiltonian and in the presence of magnetic, dc electric and off-resonant light fields.

Calculate – uses the eigenstates and eigenenergies found from diagonalising the Hamiltonian to run various calculations. Can be used to identify quantum numbers of eigenstates, calculate transition dipole moments and polarisabilities.

Constants – includes all known constants for CaF, BaF and SrF.

Examples:

There are three example files for calculating the energy structure in the presence of a magnetic, off-resonant light and electric field (example_Bfield, example_ac_Efield, example_dc_Efield).

There are two files to calculate the electric and magnetic moments of states (example_electric_moment, example_magnetic_moment).

We provide example_polarisability to calculate the polarisability for a given wavelength and polarisation of light.

Finally, example_tdm can be used to calculate the transition dipole moment.

Example

.. code-block:: python

import numpy as np
import dipolmol.hamiltonian as hamiltonian
import dipolmol.calculate as calc
from dipolmol.constants import SrF

Nmax=4 #Identify the maximum N 
H0,H_B,H_dc,H_ac 
	= hamiltonian.build
		(Nmax,SrF,zeeman=True,Edc=False
          ,Eac=False) 

B = np.linspace(0,100,5000)*1e-4 #Tesla

H = H_0[..., None] + H_B[..., None]*B
H = H.transpose(2,0,1)

energies, states, label_list = 
   calc.solve(H, Nmax, SrF,label=True, B)

Resulting plot of above code

.. image:: Images/zeeman_SrF_plot.png :width: 400 :alt: Resulting plot of above example

For more examples of usage, see the ./Examples module.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dipolmol-1.1.5.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dipolmol-1.1.5-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file dipolmol-1.1.5.tar.gz.

File metadata

  • Download URL: dipolmol-1.1.5.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for dipolmol-1.1.5.tar.gz
Algorithm Hash digest
SHA256 239bd09f96a37c0fedae0f741cf4ebe67e6eade122467e1362602f58347084bf
MD5 4fe2b74a8e04b19cf1300368c473daf3
BLAKE2b-256 b405f461d119e55bf95bb8cad3d24bf51d691be60259799c5c7b1996df3a1a5b

See more details on using hashes here.

File details

Details for the file dipolmol-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: dipolmol-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for dipolmol-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 49ad9a57c0ee28784e748261e485c79f1cb861ef8aafae796220469aa4b2b8e5
MD5 9d79c627775224dde10ccbf38a5e295c
BLAKE2b-256 f85c21f24d1b40d9d67e6e1c03b63e2cd2a85df3ba1102a2d1012d926245dc98

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page