Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanqing-wang authored Nov 10, 2022
1 parent e8e36f7 commit 2f4a3a5
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Espaloma Charge
Standalone charge assignment from Espaloma framework. https://doi.org/10.1039/D2SC02739A
Espaloma Charge
=======

Standalone charge assignment from Espaloma framework. https://doi.org/10.1039/D2SC02739A

## Installation

```bash
pip install espaloma_charge
```

## Example
**Assign charges to rdkit molecule.**

```python
>>> from rdkit import Chem; from espaloma_charge import charge
Expand All @@ -21,6 +23,19 @@ array([0., 0.], dtype=float32)
Assign charges to your favorite molecule in
[![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1e14EkNyidPI0wXBGcewh9m9LC1imSRWZ?usp=sharing)


Alternatively, **Use with [`openff-toolkit`](https://github.com/openforcefield/openff-toolkit)**(installation required)

```python
>>> from openff.toolkit.topology import Molecule
>>> from espaloma_charge.openff_wrapper import EspalomaChargeToolkitWrapper
>>> toolkit_registry = EspalomaChargeToolkitWrapper()
>>> molecule = Molecule.from_smiles("N#N")
>>> molecule.assign_partial_charges('espaloma-am1bcc', toolkit_registry=toolkit_registry)
>>> molecule.partial_charges
<Quantity([0. 0.], 'elementary_charge')>
```

## Reference
If you are using this little tool in your pipeline, please consider citing:

Expand Down

0 comments on commit 2f4a3a5

Please sign in to comment.