Skip to main content

OpenFF Interchange

Test status CI Status pre-commit.ci status
Code quality pre-commit Codecov coverage
Latest release GitHub release (latest by date including pre-releases)
User support Documentation Status Discussions

A project (and object) for storing, manipulating, and converting parametrized chemical systems.

Documentation

Documentation for Interchange, including examples, a brief user guide, release history, and API docs, is available on the OpenFF website. Example notebooks are rendered online among examples from other projects in the OpenFF ecosysytem docs.

How to cite

For instructions on how to cite OpenFF tools or force fields, see our website.

Installation

Recent versions of the OpenFF Toolkit (0.11.0+, released August 2022) install Interchange by default through its Conda package.

Interchange can also be installed manually via mamba (or conda, etc.):

mamba install openff-interchange -c conda-forge

Getting started

The Interchange object serves primarily as a container object for parametrized chemical systems. Its key use case involves SMIRNOFF force fields and chemical topologies prepared via the OpenFF Toolkit. The resulting object stores parametrized chemical systems and provides APIs for export to common formats.

from openff.toolkit import ForceField, Molecule, Quantity

# Use the OpenFF Toolkit to generate a molecule object from a SMILES pattern
molecule = Molecule.from_smiles("CCO")

# Generate a conformer to be used as atomic coordinates
molecule.generate_conformers(n_conformers=1)

# Convert this molecule to a topology
topology = molecule.to_topology()

# Define periodicity via box vectors
topology.box_vectors = Quantity([4, 4, 4], "nanometer")

# Load OpenFF 2.0.0 "Sage"
sage = ForceField("openff-2.0.0.offxml")

# Create an Interchange object - can also use Interchange.from_smirnoff()
out = sage.create_interchange(force_field=sage, topology=topology)

# Convert the Interchnage object to an OpenMM System
system = out.to_openmm()

# or write to GROMACS files
out.to_gromacs(prefix="out")

# or write to Amber files
out.to_amber(prefix="out")

# or store as JSON
json_blob = out.json()

For more functionality, usage guidelines, and examples, please consult the full documentation

Developing

See the Development guide.

Copyright

Copyright (c) 2020, Open Force Field Initiative

License

The source code of Interchange is hosted on GitHub and is available under the MIT license (see the file LICENSE). Some parts inherit from code distributed under other licenses, as detailed in LICENSE-3RD-PARTY.

Acknowledgements

Project based on the Computational Molecular Science Python Cookiecutter version 1.2.

Metadata

Release files for neoralab-openff-interchange 0.1.4.post0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neoralab-openff-interchange 0.1.4.post0
File Size Uploaded
neoralab_openff_interchange-0.1.4.post0.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for neoralab-openff-interchange 0.1.4.post0
File Interpreter ABI Platform
neoralab_openff_interchange-0.1.4.post0-py3-none-any.whl Python 3 none any Details

Total release size: 2.4 MB

Release files / neoralab_openff_interchange-0.1.4.post0.tar.gz

Download URL neoralab_openff_interchange-0.1.4.post0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
8087ee73dac072494d35563a5a0605acc1339b31f8450fdeb2735c57f54d2253
BLAKE2b-256 checksum
How to use checksums
d8b133d358ce3ee8668a47ace22b057b6dcc2eb1ad1d94082f3ffddd8ded2ba6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / neoralab_openff_interchange-0.1.4.post0-py3-none-any.whl

Download URL neoralab_openff_interchange-0.1.4.post0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
20d6f5c291fec91bbba2ade811386b5236ff516029e07aad96bd6a0f76dd0a0b
BLAKE2b-256 checksum
How to use checksums
f811be36e163906cddf39e97bd431e4c8adc1d216a5227c6984e220ce4e3d2e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.4.post0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page