qc2.ase.dirac_io

Input/Output functions for Rose.

Attributes

_scf_energy_re

_mp_energy_re

_cc_energy_re

_cct_energy_re

_ci_energy_re

Functions

_update_dict(→ Dict[str, Any])

Updates a dict with a new key-value pair and put it at first position.

_replace_underscores(→ Dict[str, Any])

Recursively replaces underscores in dict keys and values with spaces.

_format_value(→ str)

Formats the input value.

_write_block(→ str)

Writes a block of formatted data.

write_dirac_in(input_filename, **params)

Writes DIRAC input data to a file.

read_dirac_out(→ Dict[str, Any])

Reads DIRAC output data from a file.

Module Contents

qc2.ase.dirac_io._update_dict(dictionary: Dict[str, Any], key: str, value: Any) Dict[str, Any][source]

Updates a dict with a new key-value pair and put it at first position.

Parameters:
  • dictionary – The original dictionary to be updated.

  • key – The key of the new element to be added.

  • value – The value of the new element to be added.

Returns:

The updated dictionary with the new key-value pair at first position.

qc2.ase.dirac_io._replace_underscores(dictionary: Dict[str, Any]) Dict[str, Any][source]

Recursively replaces underscores in dict keys and values with spaces.

Parameters:

dictionary – The dictionary to be processed.

Returns:

The dictionary with underscores replaced by spaces.

qc2.ase.dirac_io._format_value(arg: Any) str[source]

Formats the input value.

Parameters:

arg – The value to be formatted.

Returns:

The formatted value as a string.

qc2.ase.dirac_io._write_block(name: str, args: Dict[str, Any]) str[source]

Writes a block of formatted data.

Parameters:
  • name – The name of the block.

  • args – The dictionary containing the data for the block.

Returns:

The formatted block as a string.

qc2.ase.dirac_io.write_dirac_in(input_filename: str, **params: Dict[str, Any])[source]

Writes DIRAC input data to a file.

Parameters:
  • input_filename – input file to be generated.

  • params – Additional parameters for the DIRAC input.

Returns:

None.

qc2.ase.dirac_io._scf_energy_re[source]
qc2.ase.dirac_io._mp_energy_re[source]
qc2.ase.dirac_io._cc_energy_re[source]
qc2.ase.dirac_io._cct_energy_re[source]
qc2.ase.dirac_io._ci_energy_re[source]
qc2.ase.dirac_io.read_dirac_out(output_filename: str) Dict[str, Any][source]

Reads DIRAC output data from a file.

Parameters:

output_filename – The DIRAC output file.

Returns:

A dictionary containing the extracted data from the DIRAC output.