molecular-orbitals

Molecular Orbitals and Reaction Modeling

PyPI version Documentation Status License: MIT DOI

Overview

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.

Key Features

Installation

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

Getting Started

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)

Command-Line Interface (CLI)

The library also includes a command-line interface (CLI) for easier interaction. Here are some common commands:

Parsing XYZ Files

molecular_orbitals parse_xyz molecule.xyz

This command parses an XYZ file and outputs the molecular structure.

Exporting Data

Export molecular data to JSON or CSV format:

molecular_orbitals export_data molecule.xyz output.json --format json

Visualizing Orbitals

Generate a 2D or 3D visualization of molecular orbitals:

molecular_orbitals visualize_orbitals molecule.xyz

Documentation

Full documentation, including detailed examples and API references, can be found on the official documentation site.

Contributing

We welcome contributions from the community! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Open a Pull Request.

For more details, see our CONTRIBUTING.md file.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

We would like to thank the open-source community for their invaluable contributions to this project.