Registry / data / pyocse

pyocse

JSON →
library0.1.3pypypi✓ verified 82d ago

Python Organic Crystal Simulation Environment (pyocse) is a library designed for simulating organic crystals. It facilitates tasks like automated force field generation for CHARMM and handling crystal structures and molecules. The current stable version is 0.1.3, with releases being infrequent, primarily tied to significant feature additions and core updates.

pip install pyocse
INSTALL
IMPORT
SIG · PYOCSE
P
pyocse
datapythonv0.1.3
Install
1.7s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.8MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Molecule
import pyocse
from pyocse import Molecule

This quickstart demonstrates how to initialize a `pyocse.data.Molecule` object, specifically by converting an `ase.Atoms` object. It then shows how to access basic molecular properties and interact with the underlying `ase` object for more detailed atomic manipulation, highlighting the interoperability.

from pyocse.data import Molecule from ase.build import molecule as ase_build_molecule # Create an ASE Atoms object for water h2o_ase = ase_build_molecule("H2O") # Initialize a pyocse Molecule from the ASE object mol_h2o = Molecule(ase_atom=h2o_ase, name="Water") print(f"Molecule Name: {mol_h2o.name}") print(f"Number of Atoms in pyocse Molecule: {len(mol_h2o.atoms)}") print(f"Atom symbols: {[atom.symbol for atom in mol_h2o.atoms]}") # Access the underlying ASE Atoms object for ASE-specific methods if mol_h2o.ase_atom: print(f"Positions of first atom (via ASE): {mol_h2o.ase_atom.get_positions()[0]}") else: print("Underlying ASE Atoms object not available.")
Debug
Known issues
breakingThe API for automated force field generation was significantly reworked in v0.1.0. Scripts relying on pre-0.1.0 `pyocse.force_field` modules will likely require updates.
fix
Consult the v0.1.0 release notes and updated examples in the documentation for the current usage patterns of `pyocse.force_field`.
affects: <0.1.0
gotchaPyOCSE objects (`Molecule`, `Crystal`) frequently wrap or convert `ase` and `pymatgen` objects. Direct methods from `ase.Atoms` or `pymatgen.Structure` may not be directly available on `pyocse` objects without explicitly accessing their `ase_atom` or `pymatgen_structure` attributes.
fix
To use `ase` or `pymatgen`-specific methods, access the underlying object via `mol.ase_atom` (or `mol.pymatgen_structure` if applicable) for `Molecule` and similarly for `Crystal`.
affects: all
gotchaAutomated force field generation via `pyocse.force_field` often leverages external services, specifically CHARMM-GUI. This implies a dependency on internet connectivity and the stability/API of the external service, which is outside of `pyocse`'s direct control.
fix
Ensure a stable internet connection for force field generation. Be aware that changes in CHARMM-GUI's interface could impact `pyocse`'s functionality, potentially requiring updates or adjustments.
affects: all
Upgrade
Version history
0.1.3latest on PyPI · released Dec 6, 2025
Audit
Dependencies
aserequiredAtomic Simulation Environment: Core for handling atomic structures and simulations.
numpyrequiredFundamental library for numerical operations in scientific computing.
scipyrequiredScientific computing library, provides optimization, linear algebra, etc.
mendeleevrequiredProvides detailed element data and periodic table information.
pymatgenrequiredPython Materials Genomics: Tools for materials structure analysis and manipulation.
tqdmrequiredFor displaying progress bars during longer operations.
Agent activity
30 hits · last 30 days
node
26
OpenAI (training)
1
Resources
pyocse — pip install pyocse · libregistry