Registry / ai-ml / hydride

hydride

JSON →
library1.2.3pypypi✓ verified 79d ago

A Python library for adding hydrogen atoms to molecular models (protein structures, ligands, etc.). Version 1.2.3, with regular releases. Recommended for computational chemistry workflows.

pip install hydride
INSTALL
IMPORT
SIG · HYDRIDE
H
hydride
ai-mlpythonv1.2.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

add_hydrogen
from hydride import add_hydrogen
from hydride import add_hydrogens
AtomNameLibrary
from hydride import AtomNameLibrary
FragmentLibrary
from hydride import FragmentLibrary

Add hydrogens to a simple ethanol molecule.

from hydride import add_hydrogens from rdkit import Chem mol = Chem.MolFromSmiles('CCO') try: mol_with_h = add_hydrogens(mol) print(Chem.MolToSmiles(mol_with_h)) except Exception as e: print(f'Error: {e}')
Debug
Known issues
breakingIn version 1.2.0, the add_hydrogens function moved from hydride.core to hydride. Import via 'from hydride import add_hydrogens'. The old path 'from hydride.core import add_hydrogens' will raise ImportError in 1.2.x.
fix
Update import to 'from hydride import add_hydrogens'.
affects: >=1.2.0
deprecatedThe function 'hydride.add_all_hydrogens' is deprecated since 1.1.0 and will be removed in 2.0.0. Use 'add_hydrogens' with appropriate options instead.
fix
Replace with 'add_hydrogens(mol, add_all=True)'.
affects: >=1.1.0, <2.0.0
gotchaInput molecules must have explicit hydrogens removed before processing. Passing a molecule with existing hydrogens will cause incorrect geometry or failure.
fix
Use Chem.RemoveHs(mol) before calling add_hydrogens, or ensure the molecule has no explicit hydrogens.
affects: all
Upgrade
Version history
1.2.3latest on PyPI · released Nov 4, 2024
Audit
Dependencies
rdkitoptionalMolecular representation and operations
Agent activity
12 hits · last 30 days
node
12
Resources

No resource links recorded.

hydride — pip install hydride · libregistry