wailord.io.inp module

An orca input generator and reader

This module reads in a configuration file and generates the requisite input files. It also reads existing configuration files and returns interesting things. A short description of the input types is at the ORCA input description page.

Example

See the tests for more

$ pytest

Some more details.

Todo

  • Make tests

  • Return interesting things

  • Add MNDO and other semi-empirical methods, which employ a minimal basis by default and do not need a basis set in the input

  • Add more explicit support for “simple input lines”

  • Add more explicit support for the “block input structure”

  • Add support for “sequential” jobs

  • Support multiple xyz files [DONE]

  • Clean up geometry, add gen_dirs back

  • Test and expand brokensym

  • Test number in harness

  • Test Visualizer modifications

  • Validate scans and constraints

  • Parse wailord generated input files

class wailord.io.inp.blockInput(data)[source]

Bases: object

Base class representing block inputs

class wailord.io.inp.coordBlock(data)[source]

Bases: object

Base class for the coordinate block

class wailord.io.inp.inpGenerator(filename)[source]

Bases: object

gendir_qc(basename=None, extra=None)[source]

Function to generate QC folder structure recursively

gendir_qcbasis(path)[source]

Generates the directory of input files. Note that the folders will have + replaced by P and * by 8

gendir_qccalc(path)[source]

Generates set of calculation folders

gendir_qcspin(path)[source]

Generates the style folders

genharness(basename, slow=False)[source]

Generate a harness file.

Parameters
  • basename (str) – The folder into which the harness should be put.

  • slow (bool) – A parameter used to ensure better practices, rate limits to submitting 10 files every 30 seconds

Returns

This generates a file, and nothing else

Return type

Nothing

geninp(path)[source]

Uses the path to generate details for an input file

geom_constrain(cons, constype)[source]

Handles constraints

geom_scan(thing, scantype)[source]

Handles scans

params_range(thing, comment)[source]

Handles variables with range

params_slot(thing)[source]
params_value(thing, comment)[source]
parse_blocks(blocks)[source]

Generic Block Handler

Consider the following: blocks:

  • method:
    • Z_Tol: “1e-14”

    • SpecialGridAtoms: “28, 29, 27”

    • SpecialGridIntacc: “8, 8, 8”

Which is to be mapped to: %method

Z_Tol 1e-14 SpecialGridAtoms 28, 29, 27 SpecialGridIntacc 8, 8, 8

end

Parameters

None

Returns

The blocks to be rendered

Return type

blocks (list of str)

parse_geom(geom)[source]

Rework the geometry into output

parse_keywords(keywords)[source]
parse_params(params)[source]

Rework the parameters into output. Recall that these do not require relaxation, and can also take fixed variables. On the other hand, these need more information to set up.

parse_qc()[source]
parse_scf(scf)[source]
parse_viz(viz)[source]
parse_xyz()[source]

Generate folder structure for each system

parse_yml()[source]

Handle the various options

putscript(from_loc, to_loc, slug)[source]

Copies the jobscript

read_yml()[source]

Returns the overall output.

scan_comment(between, thistype, use_types={'A': 'Angle', 'B': 'Bond', 'D': 'Dihedral'}, usage='scan for')[source]

Generate a comment line, or raise an error

writeinp(confobj, extralines=None)[source]

Writes an input file. Minimally should have: basis, calc, spin, style, name extralines: Optional set of lines to write out before the coordinate block

class wailord.io.inp.simpleInput(data)[source]

Bases: object

Base class for representing the simple input line