Skip to main content

Generate quantum chemistry input files from molecular structures

Project description

qcinput

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_keywords = ["Opt=ModRedundant"]
constraint_atoms = [[0, 1], [2, 3]]
step2_keywords = ["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. Note: TOML uses 0-indexed atoms, but Gaussian ModRedundant is 1-indexed; conversion is automatic. 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 keywords

[gaussian.task.int]
base_keywords = ["B3LYP/def2TZVP"]
keywords = ["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.7.0.tar.gz (15.9 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.7.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qcinput-0.7.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for qcinput-0.7.0.tar.gz
Algorithm Hash digest
SHA256 5e43067115b9011fe8db221b4e44971ca3779550ad1a392f4c11f9610e22f836
MD5 7d984eef703173d41ccda5fda1863683
BLAKE2b-256 c5505427fe24472f5de29ba83ba948fdb01db8a0eec6eab8a64188988dcbb013

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for qcinput-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba6076cc2b621ca1a837518f450219b1751b6c30803dd2ea7556289ae03202ab
MD5 93b252414f3cbba2cea1819c47849925
BLAKE2b-256 74b9c8b844f41f382af1076d4de2118b806350671640051e918f4f65b363c9c0

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