Skip to main content

Generate quantum chemistry input files from molecular structures

Project description

qcinput

qcinput is a CLI tool that reads an xyz or gjf geometry, loads task type and keywords from TOML, and writes an ORCA or Gaussian input file.

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
base_keywords = ["r2scan-3c", "D4", "def2-mTZVPP"]
extra_keywords = ["TightSCF", "NormalSCF"] # optional, appended at end
smd = false # optional
smd_solvent = "toluene"

[orca.task.int]
keywords = ["Opt", "Freq"]

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

[gaussian.task.int]
route = ["Opt", "Freq"]

Output Snippet

# Generated by qcinput v<version> (https://github.com/yushengyangchem/qcinput)
! Opt Freq r2scan-3c D4 def2-mTZVPP
%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.5.0.tar.gz (15.1 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.5.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for qcinput-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0069659746b1129f1c851896f47b7a299cfbddc4c704b10acc46a0ac724eb13f
MD5 5cd9934e3b60af4d59048de62264d340
BLAKE2b-256 ee5edea3384fe6d2e7c4454b3b0df7fea84aad6fed135dcfdbdb3c5f591c864e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qcinput-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3325382422978b588abcec20d1d663d9f5d7741f0d53ddd6c6281b34eeabdf16
MD5 edeb5adfd5adc4c246613ee7ee67a76b
BLAKE2b-256 bff5ed411f4f75061cfd8c52a8344a80a8083d27ae0d9a05447286e1cf5d13cb

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