Molecular Orbitals and Reaction Modeling is a Python library for modeling molecular orbitals and analyzing chemical reactions using quantum chemistry methods. The library is designed to be easy to use, extendable, and compatible with external quantum chemistry tools like Psi4.
You can install the molecular_orbitals
library directly from PyPI:
pip install molecular_orbitals
For advanced quantum chemistry calculations, you may also want to install Psi4:
conda install psi4 -c psi4
Here is a quick example to get you started with calculating molecular orbitals:
from molecular_orbitals.core.molecule import Molecule, Atom
from molecular_orbitals.core.orbital_calculation import OrbitalCalculation
# Define a molecule (e.g., H2)
atoms = [
Atom('H', (0.0, 0.0, 0.0)),
Atom('H', (0.0, 0.0, 0.74))
]
molecule = Molecule(atoms)
# Calculate orbitals using the Hartree-Fock method
calc = OrbitalCalculation(molecule)
orbitals = calc.calculate_orbitals(method='HF')
print("Orbital matrix:")
print(orbitals)
The library also includes a command-line interface (CLI) for easier interaction. Here are some common commands:
molecular_orbitals parse_xyz molecule.xyz
This command parses an XYZ file and outputs the molecular structure.
Export molecular data to JSON or CSV format:
molecular_orbitals export_data molecule.xyz output.json --format json
Generate a 2D or 3D visualization of molecular orbitals:
molecular_orbitals visualize_orbitals molecule.xyz
Full documentation, including detailed examples and API references, can be found on the official documentation site.
We welcome contributions from the community! Please follow these steps to contribute:
git checkout -b feature-branch
).git commit -am 'Add new feature'
).git push origin feature-branch
).For more details, see our CONTRIBUTING.md file.
This project is licensed under the MIT License - see the LICENSE file for details.
We would like to thank the open-source community for their invaluable contributions to this project.