17.1.1.9. pysisyphus.io package

17.1.1.9.1. Submodules

17.1.1.9.2. pysisyphus.io.cjson module

pysisyphus.io.cjson.geom_from_cjson(fn, **kwargs)[source]
pysisyphus.io.cjson.parse_cjson(fn)[source]

17.1.1.9.3. pysisyphus.io.crd module

pysisyphus.io.crd.a8(str_)[source]
pysisyphus.io.crd.atoms_coords_to_crd_str(atoms, coords, resno=1, res='UNL1', segid=None, resid=1, ref_atoms=None, del_atoms=None)[source]
pysisyphus.io.crd.f20(float_)[source]
pysisyphus.io.crd.geom_from_crd(fn, **kwargs)[source]
pysisyphus.io.crd.geom_to_crd_str(geom, **kwargs)[source]
pysisyphus.io.crd.i10(int_)[source]

17.1.1.9.4. pysisyphus.io.hdf5 module

pysisyphus.io.hdf5.get_h5_group(fn, group_name, data_model=None, reset=False)[source]

Return (and create if neccesary) group with given name and data model.

pysisyphus.io.hdf5.init_h5_group(f, group_name, data_model)[source]

Create group with given name and data model.

pysisyphus.io.hdf5.resize_h5_group(group, max_cycles)[source]

Increase size of first dimension of datasets in the given group.

17.1.1.9.5. pysisyphus.io.hessian module

pysisyphus.io.hessian.cart_displs_to_vib_normal_modes(cart_displs, chunk_size=5)[source]

Convert Cartesian normal modes into TURBOMOLE vib_normal_modes format.

cart_displs must be a matrix of shape (3N, 3N), with Cartesian displacements in columns. One column per normal mode. The columns must be normalized.

Return type:

str

pysisyphus.io.hessian.format_vib(vib_displs, chunk_size=3)[source]
pysisyphus.io.hessian.format_xyz(xyz)[source]
pysisyphus.io.hessian.geom_from_hessian(h5_fn, with_attrs=False, calculator=None, **geom_kwargs)[source]

Construct geometry from pysisyphus Hessian in HDF5 format.

Parameters:
  • h5_fn (str) -- Filename of HDF5 Hessian.

  • with_attrs (bool, default: False) -- Whether to also return an attributes dictionary. Attributes contain charge and multiplicity, as well as atoms and the electronic energy.

  • calculator (default: None) -- Calculator that is set on the Geometry object, before energy & hessian are assigned. This argument is not typed, as using 'Calculator' and the associated import leads to a circular import.

Returns:

  • geom -- Geometry object with Hessian and electronic energy set.

  • attrs -- Dictinoary containing the attributes set in the HDF5 file. Only returned when with_attrs is True.

pysisyphus.io.hessian.normal_modes_to_molden(atoms, coords3d, nus, cart_displs, thresh=10.0)[source]
Return type:

str

pysisyphus.io.hessian.save_hessian(h5_fn, geom, cart_hessian=None, energy=None, mult=None, charge=None)[source]
pysisyphus.io.hessian.save_third_deriv(h5_fn, geom, third_deriv_result, H_mw, H_proj)[source]

17.1.1.9.6. pysisyphus.io.mol2 module

pysisyphus.io.mol2.dict_to_mol2_string(as_dict)[source]
pysisyphus.io.mol2.geom_from_mol2(text, **kwargs)[source]
pysisyphus.io.mol2.render_xyz(xyz)[source]

17.1.1.9.7. pysisyphus.io.molden module

exception pysisyphus.io.molden.MoldenError[source]

Bases: Exception

pysisyphus.io.molden.geoms_from_molden(fn, **kwargs)[source]
pysisyphus.io.molden.get_xtb_nuc_charges(atoms, as_ecp_electrons=False)[source]

Modified nuclear charges w/o core electrons.

Adapated from Multiwfn 3.8

pysisyphus.io.molden.parse_mo(mo_lines)[source]
pysisyphus.io.molden.parse_molden_atoms(data)[source]
pysisyphus.io.molden.radial_integral(l, exponent)[source]
Integrates

(r r**l * exp(-exponent * r**2))**2 dr from r=0 to r=oo

as described in the SI of the JANPA paper [1] (see top of page 8, second integral in the square root.

In my opinion, the integrals lacks a factor 'r'. Below, some sympy code can be found to solve this integral (including 1*r).

import sympy as sym r, z = sym.symbols("r z", positive=True) l = sym.symbols("l", integer=True, positive=True) sym.integrate((r * r**l * sym.exp(-z*r**2))**2, (r, 0, sym.oo))

The 'solved' integral on page 8 is correct again.

∞ ⌠ ⎮ 2 ⎮ 2 2⋅l -2⋅r ⋅z ⎮ r ⋅r ⋅ℯ dr = (2*z)**(-l - 1/2)*gamma(l + 3/2)/(4*z) ⌡ 0

17.1.1.9.8. pysisyphus.io.pdb module

pysisyphus.io.pdb.atoms_coords_to_pdb_str(atoms, coords, fragments=None, resname='', conect=True)[source]
pysisyphus.io.pdb.geom_from_pdb(fn, **kwargs)[source]
pysisyphus.io.pdb.geom_to_pdb_str(geom, detect_fragments=False, **kwargs)[source]
pysisyphus.io.pdb.get_conect_lines(atoms, coords)[source]
pysisyphus.io.pdb.get_parser(widths)[source]
pysisyphus.io.pdb.parse_atom_name(name)[source]

17.1.1.9.9. pysisyphus.io.pubchem module

pysisyphus.io.pubchem.cid_from_name(name)[source]
pysisyphus.io.pubchem.geom_from_pubchem_name(name, **kwargs)[source]
pysisyphus.io.pubchem.sdf_from_cid(cid)[source]

17.1.1.9.10. pysisyphus.io.sdf module

pysisyphus.io.sdf.geom_from_sdf(text, **kwargs)[source]
pysisyphus.io.sdf.parse_coord_line(line)[source]
pysisyphus.io.sdf.parse_sdf(text)[source]

17.1.1.9.11. pysisyphus.io.xyz module

pysisyphus.io.xyz.geom_from_xyz(fn, **kwargs)[source]
pysisyphus.io.xyz.geoms_from_inline_xyz(inline_xyz, **kwargs)[source]
pysisyphus.io.xyz.geoms_from_xyz(fn, **kwargs)[source]

17.1.1.9.12. pysisyphus.io.zmat module

class pysisyphus.io.zmat.ZLine(atom, rind, r, aind, a, dind, d)

Bases: tuple

a

Alias for field number 4

aind

Alias for field number 3

atom

Alias for field number 0

d

Alias for field number 6

dind

Alias for field number 5

r

Alias for field number 2

rind

Alias for field number 1

pysisyphus.io.zmat.geom_from_zmat(zmat, atoms=None, coords3d=None, geom=None, start_at=None, drop_dummy=True, **geom_kwargs)[source]

Adapted from https://github.com/robashaw/geomConvert by Robert Shaw.

pysisyphus.io.zmat.geom_from_zmat_fn(fn, **geom_kwargs)[source]
pysisyphus.io.zmat.geom_from_zmat_str(text, coord_type='cart', coord_kwargs=None)[source]
pysisyphus.io.zmat.zmat_from_fn(fn)[source]
pysisyphus.io.zmat.zmat_from_str(text)[source]

17.1.1.9.13. Module contents

pysisyphus.io.geom_from_cjson(fn, **kwargs)[source]
pysisyphus.io.geom_from_crd(fn, **kwargs)[source]
pysisyphus.io.geom_from_cube(inp, *args, **kwargs)
pysisyphus.io.geom_from_fchk(inp, *args, **kwargs)
pysisyphus.io.geom_from_hessian(h5_fn, with_attrs=False, calculator=None, **geom_kwargs)[source]

Construct geometry from pysisyphus Hessian in HDF5 format.

Parameters:
  • h5_fn (str) -- Filename of HDF5 Hessian.

  • with_attrs (bool, default: False) -- Whether to also return an attributes dictionary. Attributes contain charge and multiplicity, as well as atoms and the electronic energy.

  • calculator (default: None) -- Calculator that is set on the Geometry object, before energy & hessian are assigned. This argument is not typed, as using 'Calculator' and the associated import leads to a circular import.

Returns:

  • geom -- Geometry object with Hessian and electronic energy set.

  • attrs -- Dictinoary containing the attributes set in the HDF5 file. Only returned when with_attrs is True.

pysisyphus.io.geom_from_mol2(text, **kwargs)[source]
pysisyphus.io.geom_from_pdb(fn, **kwargs)[source]
pysisyphus.io.geom_from_pubchem_name(name, **kwargs)[source]
pysisyphus.io.geom_from_qcschema(qcschema, **geom_kwargs)[source]
pysisyphus.io.geom_from_zmat(zmat, atoms=None, coords3d=None, geom=None, start_at=None, drop_dummy=True, **geom_kwargs)[source]

Adapted from https://github.com/robashaw/geomConvert by Robert Shaw.

pysisyphus.io.geoms_from_molden(fn, **kwargs)[source]
pysisyphus.io.geoms_from_xyz(fn, **kwargs)[source]
pysisyphus.io.save_hessian(h5_fn, geom, cart_hessian=None, energy=None, mult=None, charge=None)[source]
pysisyphus.io.save_third_deriv(h5_fn, geom, third_deriv_result, H_mw, H_proj)[source]