concordantmodes
Concordant Modes (CMA) computes harmonic vibrational frequencies at a high level of theory with linear scaling. Normal modes from a cheap level of theory (level B) are used to choose the displacements, so the expensive method (level A) is needed for far fewer calculations. The method is described in J. Am. Chem. Soc. 2022, 144, 23271–23274; J. Chem. Theory Comput. 2024, 20, 10886–10898; and J. Phys. Chem. A 2026, 130, 3249–3260.
Installation
Python 3.10 or newer.
conda env create -f devtools/conda-envs/base.yaml # optional: a ready environment
conda activate concordantmodes
pip install -e . # from this directory; installs the `cma` command
pip install -e ".[symmetry]" # optional: MolSym, needed only for molsym_symmetry = True
Quickstart
mkdir water && cd water
cma init --program molpro # writes zmat, templateA.dat, templateB.dat, cma.toml
# edit zmat (your molecule) and the templates (method, basis), then:
cma run
cma run does whatever is needed next and can be run as often as you like:
- It writes the level-B displacement inputs to
DispsB/1,DispsB/2, ... - With the default
cluster = "manual"it stops and tells you which inputs to run. Run eachinput.datso that it writesoutput.datnext to it, thencma runagain. - It reads the level-B results, writes the level-A inputs to
DispsA, and stops again. - Once those are done,
cma runprints the final frequencies.
Finished calculations are never redone; only missing or failed ones are run again. cma status shows the progress of each level, and cma options lists every option.
With cluster = "slurm" or "sge" CMA submits the calculations itself (as job arrays), waits for them, and finishes in a single cma run. On Sapelo2 with the HFS lab setup, cluster_profile = "sapelo2_hfslab" sets everything up.
A main.py works as well:
from concordantmodes import ConcordantModes, Options
options = Options(coords="Delocalized", program_a="molpro", program_b="molpro")
ConcordantModes(options).run() # returns "finished" or "waiting"
Input files
| File | Contents |
|---|---|
zmat |
The Cartesian geometry (cart begin ... cart end) and the internal coordinates (ZMAT begin ... ZMAT end). A second geometry after a --- line is used for level A. |
templateB.dat, templateA.dat |
Inputs for program_b / program_a (molpro, psi4, orca or cfour). A {geometry} line is replaced by each displaced geometry (in Bohr), {natoms} by the number of atoms. |
cma.toml |
Options, one name = value per line. |
CMA knows how each program reports a finished calculation and its energy, so no regular expressions are needed for Molpro, Psi4, ORCA or CFOUR. energy_regex_* and success_regex_* still override the presets.
To skip level B (CMA-0B), put its Hessian in force_constants/ as fc_int_b.dat (internal coordinates) or, with cart_fc_b = True, fc_cart_b.dat (Cartesian, CFOUR FCMFINAL format).
Output
The console shows the level-B and final frequencies, the total energy distribution and the frequency shifts (verbosity = "quiet" or "debug" changes how much). The complete record is always in cma.log. The normal modes go to MOLDEN (write_molden = false turns it off). All force constants and gradients go in the force_constants/ folder: the final Cartesian force constants in fc_cart_a.dat, and the level-B and level-A results in fc_int_b.dat/.grad and fc_int_a.dat/.grad. Later runs read these and ignore the Disps folders, so delete force_constants/fc_int_a.dat (and .grad) to pick up rerun level-A calculations. Files from older versions in the run directory are still found.
Documentation and examples
docs/source— quickstart, zmat format, templates and output parsing, running on clusters, and the full options reference (build withsphinx-build docs/source docs/build).examples/0_quickstart— the filescma initwrites, for Molpro and Psi4.examples/— water, methanol, ammonia, cyclopropane and benzene with different coordinate systems, programs and CMA variants.
Development
pip install -e ".[tests]"
pytest
Building the documentation
The manual is written with Sphinx and lives in docs/source.
-
Install CMA with the documentation extras (Sphinx and the PyData theme), from the repository root:
pip install -e ".[docs]"
-
Build the HTML pages:
cd docs make html SPHINXOPTS=-W # on Windows: make.bat html
Without
make, run the same build directly from the repository root:sphinx-build -W -b html docs/source docs/build/html
-
Open
docs/build/html/index.htmlin a browser.
Notes:
-Wtreats warnings as errors, as the Read the Docs build does. Fix any warning before pushing, or the online build fails.- The options reference (
docs/source/reference/options.rst) is generated fromconcordantmodes/options.pyon every build. Don't edit it by hand; it is not tracked by git. - MolSym is not needed to build the docs.
- If pages look stale after renaming or deleting files, run
make clean(or deletedocs/build/) and build again. - The online manual is rebuilt by Read the Docs from
.readthedocs.yamlon every push, once the repository is connected at https://readthedocs.org.
Upgrading from older versions
gen_disps_a/bandcalc_a/bare gone: CMA works out the stage from the files on disk. Remove them frommain.py; CMA says so if they are still there.- Unknown option names are now errors instead of being silently ignored.
clusternow defaults to"manual"(it was"sge").- The Sapelo2 and Vulcan job scripts are now the
sapelo2_hfslabandvulcan_ccqccluster profiles; without a profile, generic Slurm/SGE scripts built fromnslots,memory,time_limit,job_setupetc. are used.
Metadata
Release files for concordantmodes 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| concordantmodes-0.1.0.tar.gz | 552.4 kB | With provenance | Details for concordantmodes-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| concordantmodes-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for concordantmodes-0.1.0-py3-none-any.whl |
Total release size: 793.7 kB
Release files / concordantmodes-0.1.0.tar.gz
| Download URL | concordantmodes-0.1.0.tar.gz |
|---|---|
| Size | 552.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
632cae832e80d3004f83599a706b9f05600e325a27e94c646509141ac891b42a
|
|
BLAKE2b-256 checksum How to use checksums |
7b11fc0c3f4e50eed69b4302437a772563908a347f019f1518d8a2a4359d3dfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / concordantmodes-0.1.0-py3-none-any.whl
| Download URL | concordantmodes-0.1.0-py3-none-any.whl |
|---|---|
| Size | 241.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
032409b61c71a5b5a70b0aa4b636b080107c61daf00d1a5668c3bb69c1d96910
|
|
BLAKE2b-256 checksum How to use checksums |
bffd6ef873ce56caeb0c12dbea33ec4319d74e9241a64f9bb3058e3680a29fb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logSecurity for concordantmodes 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for concordantmodes-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.