openCOSMO-RS(py) package
About
This package is a fully python based implementation of the model COSMO-RS, supporting multiple segment descriptors. Papers related to openCOSMO-RS:
Application
The package can be installed from PyPI (Python 3.11 or newer):
pip install opencosmorspy
The 3D visualizations in opencosmorspy.cosmo_visualizations need additional packages (RDKit, scikit-image):
pip install "opencosmorspy[visualization]"
The development version can be installed directly from GitHub:
pip install git+https://github.com/TUHH-TVT/openCOSMO-RS_py
Faster C++ implementation: the same model is available as a C++ implementation with Python bindings, which is much faster. It is published on PyPI as opencosmors (pip install opencosmors, import openCOSMORS), see openCOSMO-RS_cpp. New model features are usually added there first. Note the similar names: opencosmorspy is this pure Python package, opencosmors is the C++ one.
A short introduction on its use can be found in the examples directory.
To generate the needed quantum chemical input files using RDKit and ORCA with the CPCM module, please have a look here: https://github.com/TUHH-TVT/openCOSMO-RS_conformer_pipeline
Parameterizations and model extensions
The parameterizations are classes in opencosmorspy.parameterization:
| Class | Description |
|---|---|
Parameterization("default_turbomole"), Parameterization("default_orca") |
default COSMO-RS parameters |
openCOSMORS24a |
version 24a, including the parameters of the solvation free energy |
openCOSMORS25a |
version 25a (halocarbon paper, part 2): dispersion from atomic polarizabilities (polariz_mode = 7). Needs ORCA COSMO files with the section #ATOMIC POLARIZABILITIES. |
from opencosmorspy.cosmors import COSMORS
from opencosmorspy.parameterization import openCOSMORS25a
crs = COSMORS(openCOSMORS25a())
The extensions of the model were ported from the C++ implementation and are switched on by attributes of the parameterization (with the default parameterizations the results did not change):
| Attribute (C++ switch) | Description |
|---|---|
polariz_mode (sw_SR_polarizabilities) |
0 (off), 1, 3, 5, 6, 7, 8: projection of the atomic polarizabilities on the segments and the dispersion energy. Needs "polariz" in descriptor_lst, the parameters vdw_m (m_vdW) and mf_e_f_corr (E_F_corr). |
descriptor_lst with "sigma_corr" |
cluster sigma_corr instead of sigma_orth as in the C++ implementation |
mf_use_sigma_orth, mf_sigma_corr_exclude_monoatomic_ions (sw_SR_misfit 0, 1, 2) |
misfit correlation |
differentiate_hydrogens, differentiate_molecule_groups, ion_radii (sw_SR_differentiateHydrogens, sw_SR_differentiateMoleculeGroups, radii) |
hydrogens by bonding partner, molecule groups and monoatomic cations |
segment_reference_state (sw_SR_useSegmentReferenceStateForInteractionMatrix) |
"conductor" or "pure_segment" |
comb_term |
"none", "staverman_guggenheim", "klamt", "staverman_guggenheim_exponential_scaling", "staverman_guggenheim_grensemann", "franke_hannebauer" |
radii_consistency |
check that the cavity radii of an element are identical in all COSMO files |
Reference states of COSMORS.add_job: "cosmo", "pure_component",
"pure_component_only_neutral", "reference_mixture" and
"solvation_energy". The solvation free energy (kcal/mol) is returned as
res["dGsolv"]. It needs the gas phase energy and the number of ring atoms of
every molecule: crs.add_molecule([path], e_gas=-76.3, n_ring_atoms=0).
The interaction arrays contain the dispersion energy as A_vdw/E_vdw
(A_int = A_mf + A_hb + A_vdw), their contact statistics and partial molar
values are returned as aim_* and pm_*.
Note: the aim_* energies of the C++ implementation (average_surface_energies)
are resolved by molecule pairs, the values of this package equal the sum over
the partners. Both are given in J/mol.
License
This project is licensed under the GNU Lesser General Public License v3.0 (LGPL-3.0)
Other COSMO-RS related projects
The reader might be also interested in the following related projects:
Metadata
Release files for opencosmorspy 1.0.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 |
|---|---|---|---|---|
| opencosmorspy-1.0.0.tar.gz | 52.7 kB | With provenance | Details for opencosmorspy-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opencosmorspy-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for opencosmorspy-1.0.0-py3-none-any.whl |
Total release size: 100.2 kB
Release files / opencosmorspy-1.0.0.tar.gz
| Download URL | opencosmorspy-1.0.0.tar.gz |
|---|---|
| Size | 52.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4b89c67be62229321ce3f242f5cfc66ea41e72f7bef0688f96bdaa3b044c56f
|
|
BLAKE2b-256 checksum How to use checksums |
c119f62c05dfb3d089d8218eecd7f08213b2573e20461e567cc43d8708ca4b12
|
| 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 / opencosmorspy-1.0.0-py3-none-any.whl
| Download URL | opencosmorspy-1.0.0-py3-none-any.whl |
|---|---|
| Size | 47.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4a5f1f9780d1b43c77385e3aa5c91d1e9a29a8635c92ae23231b4ee60cc38e6
|
|
BLAKE2b-256 checksum How to use checksums |
ee30fd789c7ce0a3654de800f119ca918e2c2791d8a719580f140eda5a692a4a
|
| 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 opencosmorspy 1.0.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 opencosmorspy-1.0.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.