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> ...] [--input-dir structures/] [-c|--config <path/to/qcinput.toml>] [-o output.inp | --output-dir outputs/]
Compatibility shorthand (same behavior):
qcinput [<path/to/structure.xyz|.gjf> ...] [--input-dir structures/] [-c|--config <path/to/qcinput.toml>] [-o output.inp | --output-dir outputs/]
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
Batch examples:
qcinput *.xyz *.gjf -c qcinput.toml
qcinput --input-dir structures/ -c qcinput.toml
qcinput *.xyz --input-dir structures/ -c qcinput.toml --output-dir generated/
*.xyz / *.gjf are expanded by your shell before qcinput runs.
--input-dir scans the given directory for .xyz and .gjf files.
--output-dir writes all generated files into one directory and creates it automatically.
-o/--output is only valid when converting a single input structure.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qcinput-0.8.0.tar.gz.
File metadata
- Download URL: qcinput-0.8.0.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
041b2f4c1d38e5791e982c77ad83b5abf123c22d0d18b0fb3c24e6f6bdeaf604
|
|
| MD5 |
45494ecff8dc569cd96504054d07ea87
|
|
| BLAKE2b-256 |
6296707cb1565f9f58e0d8b55792e2965f65e772dd9789a6aba7b6b59cf1ac86
|
File details
Details for the file qcinput-0.8.0-py3-none-any.whl.
File metadata
- Download URL: qcinput-0.8.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13a32a7b2d649acd50d1613c6d7b2c08ceae7cd3ced88be47dd7a8d23af4b453
|
|
| MD5 |
093a1f2fee289130ee143737feb9a7ee
|
|
| BLAKE2b-256 |
b8f09a525d5caec2b1711329dc47076541c564206f4afda5cd5ea9f54af73a3a
|