Skip to main content

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")

Metadata

Release files for nonbond 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonbond 0.7.0
File Size Uploaded Provenance Actions
nonbond-0.7.0.tar.gz 11.0 kB Without provenance Details for nonbond-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nonbond 0.7.0
File Interpreter ABI Platform Actions
nonbond-0.7.0-py3-none-any.whl Python 3 none any Details for nonbond-0.7.0-py3-none-any.whl

Total release size: 22.4 kB

Release files / nonbond-0.7.0.tar.gz

Download URL nonbond-0.7.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6a5d335fa5d1123c0a772d2dab2f9c2977b8e1f0984400ec7ec793fd23744f72
BLAKE2b-256 checksum
How to use checksums
58f2dd6332f88719421bcb677651e380333834e5cfdebf2cb89d33a9813029ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Release files / nonbond-0.7.0-py3-none-any.whl

Download URL nonbond-0.7.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0432e493771a7ad9deb0f843a2d966399f77339b9b4d7aaec07185319c0e331b
BLAKE2b-256 checksum
How to use checksums
142daa7c3af2722c720501901a269f25f796b85c9b4a479301ae84f9d81489c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.8

Security for nonbond 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page