Skip to main content

Computational Chemistry Input Generator

Project description

Computational Chemistry Input Generator

codecov PyPI version Downloads DOI

ccinput is an application to generate input files for computational chemistry software.

Example usage:

$ ccinput gaussian opt M062X -bs def2tzvp -f ethanol.xyz -n 8 --mem 32G
%chk=calc.chk
%nproc=8
%mem=32000MB
#p opt M062X/Def2TZVP

File created by ccinput

0 1
C   -1.31970000  -0.64380000   0.00000000
H   -0.96310000  -1.65260000   0.00000000
H   -0.96310000  -0.13940000  -0.87370000
H   -2.38970000  -0.64380000   0.00000000
C   -0.80640000   0.08220000   1.25740000
H   -1.16150000   1.09160000   1.25640000
H   -1.16470000  -0.42110000   2.13110000
O    0.62360000   0.07990000   1.25870000
H    0.94410000   0.53240000   2.04240000

$ ccinput orca sp DLPNO-CCSDT -bs cc-pVTZ -f *.xyz -o .inp -n 32 --mem 250GB --parse_name
*** No C auxiliary basis set specified, using cc-pVTZ ***
*** No C auxiliary basis set specified, using cc-pVTZ ***
*** No C auxiliary basis set specified, using cc-pVTZ ***
*** No C auxiliary basis set specified, using cc-pVTZ ***
Input file written to carbo_cation.inp
Input file written to CH4.inp
Input file written to ethanol.inp
Input file written to H2.inp

$ cat H2.inp
!SP DLPNO-CCSD(T) cc-pVTZ cc-pVTZ/C
*xyz 0 1
H   -1.43860000  -0.26820000   0.00000000
H   -2.03860000  -0.26820000   0.00000000
*
%MaxCore 7812
%pal
nprocs 32
end

$ cat carbo_cation.inp
!SP DLPNO-CCSD(T) cc-pVTZ cc-pVTZ/C
*xyz 1 1
C   -2.90770000   1.66310000   0.00000000
H   -2.55100000   2.16750000   0.87370000
H   -3.97770000   1.66310000   0.00000000
H   -2.55100000   2.16750000  -0.87370000
*
%MaxCore 7812
%pal
nprocs 32
end

ccinput can also be used as python library:

>>> from ccinput.wrapper import gen_input
>>> inp = gen_input(software="orca", type="ts", method="PBEh-3c", file="ethanol.xyz", nproc=16, solvent="ethanol", solvation_model="SMD")
*** No solvation radii specified; using default radii ***
>>> print(inp)
!OPTTS PBEh-3c
*xyz 0 1
C   -1.31970000  -0.64380000   0.00000000
H   -0.96310000  -1.65260000   0.00000000
H   -0.96310000  -0.13940000  -0.87370000
H   -2.38970000  -0.64380000   0.00000000
C   -0.80640000   0.08220000   1.25740000
H   -1.16150000   1.09160000   1.25640000
H   -1.16470000  -0.42110000   2.13110000
O    0.62360000   0.07990000   1.25870000
H    0.94410000   0.53240000   2.04240000
*
%pal
nprocs 16
end
%cpcm
smd true
SMDsolvent "ethanol"
end
>>>

Installation

From PyPI

pip install ccinput

From Github

You can install the bleeding-edge version of ccinput from Github:

pip install git+https://github.com/cyllab/ccinput

Usage

ccinput supports a wide range of options, including different solvation radii, density fitting and multiple basis sets. As of now, Gaussian 16, ORCA 5 and xtb are supported, and more packages will be added in the future.

From the command line

Simply use the ccinput command with the desired parameters:


usage: ccinput [-h] [--basis_set BASIS_SET] [--solvent SOLVENT] [--solvation_model SOLVATION_MODEL] 
               [--solvation_radii SOLVATION_RADII] [--custom_solvation_radii CUSTOM_SOLVATION_RADII] 
               [--specifications SPECIFICATIONS] [--density_fitting DENSITY_FITTING] [--custom_basis_sets CUSTOM_BASIS_SETS] 
               [--xyz XYZ] [--file FILE [FILE ...]] [--output OUTPUT] [--constraints CONSTRAINTS] [--freeze ATOM [ATOM ...]] 
               [--scan ATOM [ATOM ...]] [--from FROM] [--to TO] [--nsteps NSTEPS] [--step STEP] [--nproc NPROC] [--mem MEM] 
               [--charge CHARGE] [--mult MULT] [--parse_name] [--trust_me] [--d3 | --d3bj] [--name NAME] 
               [--aux_name AUX_NAME] [--header HEADER] [--save SAVE] [--preset [PRESET]] [--driver {none,ORCA,pysis}] 
               [--version] [--fragments FRAGMENTS]
               [software] [type] [method]

More detailed information about each option can be obtained with the ccinput -h command.

As Python library

The function gen_input returns input files as a single strings with the correct whitespace.

>>> from ccinput.wrapper import gen_input
>>> inp = gen_input(...)

The input can also be directly written to a file using write_input.

>>> from ccinput.wrapper import write_input
>>> write_input(filename, ...)

See the documentation for all options.

Contributors

  • @RaphaelRobidas: xtb, Gaussian, ORCA and Pysisyphus support
  • @zarkoivkovicc: NWChem support and Counterpoise calculation in Gaussian
  • @lauragranmar: Basic Psi4 support
  • @berquist: Basic QChem support

Contributing

We welcome all contributions to the project. This includes:

  • Support for new packages (even if rudimentary)
  • Support for new features of supported packages
  • Correction or improvement of static data (like DFT functionals or basis sets)

Planned tasks are listed in the roadmap. This can be a good place to start when looking to contribute, although do not limit yourself to what is listed there. The contribution guidelines are detailed in CONTRIBUTING.md.

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

ccinput-1.10.3.tar.gz (106.0 kB view details)

Uploaded Source

Built Distribution

ccinput-1.10.3-py3-none-any.whl (100.1 kB view details)

Uploaded Python 3

File details

Details for the file ccinput-1.10.3.tar.gz.

File metadata

  • Download URL: ccinput-1.10.3.tar.gz
  • Upload date:
  • Size: 106.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for ccinput-1.10.3.tar.gz
Algorithm Hash digest
SHA256 2597bd3b72b3e0d17f275aa5966ca2efd019bc92fd5451e9e2c8707eeb1e9e53
MD5 4ffde01eafec7f16eef3e276e0333ac3
BLAKE2b-256 bc3f81f2450810cbf6510d384f82a7a5f7b9d53d0b966cc4a82460a84a0e137a

See more details on using hashes here.

File details

Details for the file ccinput-1.10.3-py3-none-any.whl.

File metadata

  • Download URL: ccinput-1.10.3-py3-none-any.whl
  • Upload date:
  • Size: 100.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for ccinput-1.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8636e91d0019522ede4dc97a429c1475605c52b18ab3963e3f14e4fbb7b60914
MD5 8d5c4f54d10a3bac1d4b1dd2f8b03bb1
BLAKE2b-256 ac775d67df28fd1a1a0201f09710f0761c16f4a57019eda5a429da8026f9872c

See more details on using hashes here.

Supported by

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