JFChemistry
A comprehensive computational chemistry workflow package built on jobflow.
Overview
JFChemistry provides a flexible framework for building computational chemistry workflows using various methods ranging from force fields to machine learning potentials. It seamlessly integrates with popular chemistry libraries like RDKit, ASE, and Pymatgen.
Key Features
- Structure Generation: Create 3D molecular structures from SMILES strings or PubChem database
- Conformer Search: Generate and optimize multiple conformers using RDKit and CREST
- Geometry Optimization: Optimize structures with multiple methods (GFN-xTB, AimNet2, ORB models)
- Structure Modification: Perform protonation/deprotonation using CREST
- Workflow Management: Build complex, parallelizable workflows with jobflow
- Multiple Calculators: Support for AimNet2, ORB, and FairChem machine learning potentials along with traditional approaches such as PySCF, TBLite, and ORCA
Installation
The package uses Pixi for dependency management:
# Clone the repository
git clone https://github.com/cfarm6/jfchemistry.git
cd jfchemistry
# Install with pixi
pixi install
# For development
pixi install -e dev
# For documentation
pixi install -e docs
Quick Start
Here's a simple workflow to create a molecule from SMILES, generate conformers, and optimize:
from jfchemistry.inputs import Smiles
from jfchemistry.generation import RDKitGeneration
from jfchemistry.optimizers import TBLiteOptimizer
# Create molecule from SMILES
smiles_maker = Smiles(add_hydrogens=True)
smiles_job = smiles_maker.make("CCO") # Ethanol
# Generate 3D conformers
generator = RDKitGeneration(num_conformers=10, method="ETKDGv3")
gen_job = generator.make(smiles_job.output["structure"])
# Optimize with GFN2-xTB
optimizer = TBLiteOptimizer(method="GFN2-xTB", fmax=0.01)
opt_job = optimizer.make(gen_job.output["structure"])
# Access results
optimized_structures = opt_job.output["structure"]
properties = opt_job.output["properties"]
Architecture
JFChemistry is built around a set of base classes that handle the core functionality of the package.
- SingleMoleculeMaker: For operations on non-periodic structures such as molecules
- SingleStructureMaker: For operations on periodic structures such as crystals
- SingleStructureMoleculeMaker: For operations that apply to both periodic and non-periodic structures
- SingleRDMoleculeMaker: For operations on molecules without 3D coordinates (RDKit molecules)
These base classes automatically handle:
- Job distribution for lists of structures
- Parallel processing of multiple conformers
- Consistent output formats across different methods
Modules
- Inputs: Create molecules from SMILES, PubChem CID
- Generation: Generate 3D structures from molecular graphs
- Conformers: Search conformational space with CREST
- Optimizers: Optimize geometries with various methods
- Calculators: Set up and run energy/property calculations
- Modification: Modify structures (protonation, deprotonation)
- Base Classes: Core framework classes
Credits
This package was created with Cookiecutter and the jevandezande/pixi-cookiecutter project template.