chemtools.basisparse module

class NumpyEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]

Bases: json.encoder.JSONEncoder

default(obj)[source]

If input object is an ndarray it will be converted into a dict holding the data and dtype.

get_l(shell)[source]

Return the orbital angular momentum quantum number for a given subshell

merge_exponents(a, b)[source]

Concatenate the arrays a and b using only the unique items from both arrays

Args:
a : numpy.array b : numpy.array
Returns:
res : 3-tuple of numpy arrays
  • res[0] sorted union of a and b
  • res[1] indices of a items in res[0]
  • res[2] indices of b items in res[0]
parse_basis(string, fmt=None)[source]

A wrapper for parsing the basis sets in different formats.

Args:
string : str
A string with the basis set
fmt : str
Format in which the basis set is specified
Returns:
out : dict
A dictionary of parsed basis sets with element symbols as keys and basis set functions as values
parse_coeffs(lines)[source]
parse_ecp(ecpstring)[source]
parse_gamessus_basis(string)[source]

Parse the basis set into a list of dictionaries from a string in gamess format.

parse_gamessus_function(lines)[source]

Parse a basis set function information from list of strings into three lists containg: exponents, indices, coefficients.

Remeber that python doesn’t recognise the 1.0d-3 format where d or D is used to the regex subsitution has to take care of that.

parse_gaussian_basis(string)[source]

Parse the basis set into a list of dictionaries from a string in gaussian format.

parse_gaussian_function(lines)[source]

Parse a basis set function information from list of strings into three lists containg: exponents, indices, coefficients.

Remeber that python doesn’t recognise the 1.0d-3 format where d or D is used to the regex subsitution has to take care of that.

parse_molpro_basis(string)[source]

Parse basis set from a string in Molpro format.

parse_molpro_shell(expsline, coeffs)[source]

Parse functions of one shell in molpro format.