NITROGEN

A Python package for quantum nuclear motion calculations and rovibronic spectroscopy.

nitrogen.X2txt(X, filename='grid.txt', write_index=True)

Create an indexed text file from an array of Cartesian positions.

Parameters
  • X ((3*N,...) ndarray) – Cartesian position of N atoms.

  • filename (str, optional) – Output filename. The default is “grid.txt”.

  • write_index (bool, optional) – Include the point index. The default is True.

Returns

Return type

None.

nitrogen.X2xyz(X, elements, filename='out.xyz', comment=None)

Create an .xyz text file from an array of Cartesian positions.

Parameters
  • X ((3*N,...) ndarray) – Cartesian position of N atoms.

  • elements (list of str) – List of element identifiers

  • filename (str, optional) – Output filename. The default is “out.xyz”.

  • comment (str, optional) – A comment string for the .xyz file. If None, a default will be used.

Returns

Return type

None.

nitrogen.parseFormula(formula)

Parse a chemical formula into a list of element symbols.

Parameters

formula (str) – The chemical formula

Returns

The list of element symbols

Return type

list

Examples

>>> n2.parseFormula('H2O')
['H', 'H', 'O']
>>> n2.parseFormula('CH3OH')
['C', 'H', 'H', 'H', 'O', 'H']
>>> n2.parseFormula('CFBrClI')
['C', 'F', 'Br', 'Cl', 'I']
nitrogen.podvr(prim_dvr, npo, i, qref, cs, pes_fun, masses, disp=0, scale_idx=1)

Construct a potential-optimized contracted DVR based on the contrained body-fixed Hamiltonian.

Parameters
  • prim_dvr (GenericDVR) – The primitive DVR.

  • npo (int) – The number of contracted functions

  • i (int) – The coordinate index to contract (w.r.t. cs and qref ordering).

  • qref (list of float) – The reference geometry.

  • cs (CoordSys) – The coordinate system.

  • pes_fun (DFun or function) – The potential energy function

  • masses (list of float) – The masses for the coordinate system.

  • disp (integer, optional) – The print level. Default is 0. Level 1 prints eneriges. Level 2 plots wavefunctions

  • scale_idx (integer, optional) – The excited energy index to use for plotting scaling. The default is 1.

Returns

A contracted DVR object.

Return type

Contracted