Skip to main content

Generate quantum chemistry input files from molecular structures

Project description

qcinput: Reproducible ORCA/Gaussian input generation from Cartesian geometries and TOML

qcinput reads an xyz or gjf geometry, applies task-specific keywords from a TOML config, It reads an xyz or gjf geometry, applies task-specific keywords from a TOML config, and emits ORCA or Gaussian input files for int, ts, or sp jobs.

Install With pip

pip install qcinput

For development (from source):

pip install -e .

Usage

qcinput generate <path/to/structure.xyz|.gjf> [-c|--config <path/to/qcinput.toml>] [-o output.inp]

Compatibility shorthand (same behavior):

qcinput <path/to/structure.xyz|.gjf> [-c|--config <path/to/qcinput.toml>] [-o output.inp]

Show version:

qcinput --version
qcinput -V

First-time setup:

qcinput init-config
qcinput init-config --kind int
qcinput init-config --kind ts
qcinput init-config --kind sp

init-config always writes int/ts/sp task sections in one TOML file; --kind only sets the initial active value of [qcinput].kind.

Default config path:

./qcinput.toml

You can override this with:

QCINPUT_CONFIG=/path/to/config.toml qcinput water.xyz

Example:

qcinput water.xyz -c qcinput.toml -o water_opt.inp

For ORCA and Gaussian, kind = "ts" now uses a two-step TS template. Use:

qcinput water.xyz -c qcinput.toml -o water_ts.inp

ORCA TS settings:

[orca.task.ts]
step1_keywords = ["Opt"]
step2_keywords = ["OptTS", "Freq"]
constraint_atoms = [[0, 1], [2, 3]]
calc_hess = true

constraint_atoms accepts either one pair ([0, 1]) or multiple pairs ([[0, 1], [2, 3], ...]). ORCA TS uses global [orca].nprocs and [orca].maxcore for the compound workflow. Step-2 reads <output_stem>_Compound_1.xyz.

Gaussian TS settings (Link1):

[gaussian.task.ts]
step1_route = ["Opt=ModRedundant"]
constraint_atoms = [[0, 1], [2, 3]]
step2_route = ["Opt=(TS,CalcFC,NoEigenTest,NoFreeze)", "Freq", "Geom=AllCheck", "Guess=Read"]

constraint_atoms accepts one pair ([0, 1]) or multiple pairs ([[0, 1], [2, 3], ...]) and will be converted to B i j F lines. Legacy modredundant is still supported for compatibility. %chk is auto-generated as <structure_stem>.chk (e.g. water.xyz -> water.chk). This applies to Gaussian int, sp, and ts.

When qcinput.engine = "gaussian", default output suffix is .gjf.

Config Format (TOML)

We use TOML because it is readable for humans, easy to version control, and strongly structured.

[qcinput]
engine = "orca" # or "gaussian"
kind = "int" # int | ts | sp

[molecule]
charge = 0
multiplicity = 1

[orca]
nprocs = 8
maxcore = 4000
extra_keywords = ["TightSCF", "NormalSCF"] # optional, appended at end
smd = false # optional
smd_solvent = "toluene"

[orca.task.int]
base_keywords = ["B3LYP", "def2-TZVP"]
keywords = ["Opt", "Freq"]

[gaussian]
nprocshared = 8
mem = "8GB"
extra_keywords = ["SCF=Tight"] # optional, appended at end of route

[gaussian.task.int]
base_keywords = ["B3LYP/def2TZVP"]
route = ["Opt", "Freq"]

Output Snippet

# Generated by qcinput v<version> (https://github.com/yushengyangchem/qcinput)
! Opt Freq B3LYP def2-TZVP
%pal
  nprocs 8
end
%maxcore 4000
* xyz 0 1
O 0.000000 0.000000 0.000000
H 0.757000 0.586000 0.000000
H -0.757000 0.586000 0.000000
*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qcinput-0.6.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qcinput-0.6.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file qcinput-0.6.0.tar.gz.

File metadata

  • Download URL: qcinput-0.6.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.11

File hashes

Hashes for qcinput-0.6.0.tar.gz
Algorithm Hash digest
SHA256 45b28e93b7ce95596bbee92798f804569e80c9fcbc1119179aeccac97c331d65
MD5 0d6904460fa0a472a0df83d36321b54b
BLAKE2b-256 4d11ba11841ef9daaabf753c3b738d6721a16d7632447722d531929cb5e78a6e

See more details on using hashes here.

File details

Details for the file qcinput-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: qcinput-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.11

File hashes

Hashes for qcinput-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 772eed314032f1ef021afcd057c4c1593cdde9727b9c9b7534225b8c9a5d2477
MD5 b8470e47161f734dafcd7117f176e00e
BLAKE2b-256 66a8402e81696b05baeaf09cc83af67e46c5420642e334b5f22e6dae48e761c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page