Nonbond
Nonbond is an ASE (Atomic Simulation Environment) calculator designed for computing non-bonded interactions, including the 12-6 Lennard–Jones (LJ) and Coulomb potentials.
It currently outputs only the total potential energy and per-atom energies.
(Note: Force and stress calculations are not yet implemented.)
Requirements
- ASE
- torch-pme
- vesin-torch
Installation
Install via pip:
conda create -n nonbond python=3.13
conda activate nonbond
pip install nonbond
Example
from ase import Atoms
from nonbond import Nonbond
import numpy as np
# Define Lennard-Jones parameters for SPC/E water
# Unit: kcal/mol
epsilon = {
'Ow': 0.15535,
'Hw': 0.0,
}
# Unit: Å
sigma = {
'Ow': 3.16600,
'Hw': 1.0,
}
# Calculator
calc = Nonbond(
epsilon=epsilon,
sigma=sigma,
cutoff=14.0, # Unit: Å, cutoff radius for LJ and Coulomb interactions
coul_method='ewald', # Options: 'direct', 'ewald', 'pme', 'p3m'
accuracy=1e-5, # Accuracy for long-range Coulomb interactions
device='cpu', # Options: 'cuda'
)
# SPC/E water molecule
atoms = Atoms(
'OH2',
positions=[
[0.00000, -0.06461, 0.00000],
[0.81649, 0.51275, 0.00000],
[-0.81649, 0.51275, 0.00000]
],
cell=[40.0, 40.0, 40.0],
pbc=True
)
# Assign atom types and charges
atoms.set_array('type', np.array(['Ow', 'Hw', 'Hw']))
atoms.set_initial_charges([-0.8476, 0.4238, 0.4238])
# Attach calculator and compute energy
atoms.calc = calc
energy = atoms.get_potential_energy()
print(f"Potential energy: {energy:.6f} eV")
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nonbond-0.7.0.tar.gz
(11.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
nonbond-0.7.0-py3-none-any.whl
(11.4 kB
view details)
File details
Details for the file nonbond-0.7.0.tar.gz.
File metadata
- Download URL: nonbond-0.7.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a5d335fa5d1123c0a772d2dab2f9c2977b8e1f0984400ec7ec793fd23744f72
|
|
| MD5 |
42657479207bfb73a7f1b93a74225143
|
|
| BLAKE2b-256 |
58f2dd6332f88719421bcb677651e380333834e5cfdebf2cb89d33a9813029ae
|
File details
Details for the file nonbond-0.7.0-py3-none-any.whl.
File metadata
- Download URL: nonbond-0.7.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0432e493771a7ad9deb0f843a2d966399f77339b9b4d7aaec07185319c0e331b
|
|
| MD5 |
3cf2f7776272f27646a115f4e2970cc8
|
|
| BLAKE2b-256 |
142daa7c3af2722c720501901a269f25f796b85c9b4a479301ae84f9d81489c3
|