Pack water molecules into atomic systems for molecular simulations
Project description
Water Packer
Pack water molecules into atomic systems for molecular simulations. High-performance, O(1) collision detection using spatial hashing.
Installation
pip install -e .
For hyobj support:
pip install -e ".[hyobj]"
Quick Start
from water_packer import WaterPacker
from ase.io import read
# Load a structure
mgo = read('periclase.cif')
# Create packer with custom distance constraints
packer = WaterPacker(
min_distance=2.0, # Default fallback distance
pairwise_distances={('O', 'Mg'): 2.5}, # Species-specific
water_density=1.0, # g/cm³
seed=42, # For reproducibility
)
# Pack water
result = packer.pack(mgo)
print(f"Added {len(result) - len(mgo)} atoms")
Features
- Multiple input formats: ASE Atoms, hyobj PeriodicSystem, or raw arrays
- Species-specific distances: Different minimum distances per atom pair
- Automatic density calculation: Computes number of waters from target density
- Volume-aware packing: Accounts for substrate exclusion volume
API
WaterPacker
WaterPacker(
min_distance=2.0, # Default minimum distance (Å)
pairwise_distances=None, # Species-specific: {('O', 'Mg'): 2.5}
water_density=1.0, # Target density (g/cm³)
seed=None, # Random seed
)
pack_water (convenience function)
from water_packer import pack_water
result = pack_water(system, n_waters=10, water_density=1.0)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file water_packer-0.2.3.tar.gz.
File metadata
- Download URL: water_packer-0.2.3.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
562b90b3eb9eade9d7b0cea77592469d11a611a824bafc8c701ad724eec802bb
|
|
| MD5 |
fe5ed7ecf271463819100ff50da989c0
|
|
| BLAKE2b-256 |
f29658b7cec97797904bfd1ecf2ead67c0e0d029798fe269be90d7b526eeb4cb
|
Provenance
The following attestation bundles were made for water_packer-0.2.3.tar.gz:
Publisher:
publish.yml on henriasv/water-packer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
water_packer-0.2.3.tar.gz -
Subject digest:
562b90b3eb9eade9d7b0cea77592469d11a611a824bafc8c701ad724eec802bb - Sigstore transparency entry: 863311372
- Sigstore integration time:
-
Permalink:
henriasv/water-packer@384c7c1a60ba16341af66d3b9e4ae4d12707cd06 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/henriasv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@384c7c1a60ba16341af66d3b9e4ae4d12707cd06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file water_packer-0.2.3-py3-none-any.whl.
File metadata
- Download URL: water_packer-0.2.3-py3-none-any.whl
- Upload date:
- Size: 24.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
682c9290787f63f2d23032d6a9bc8e5856f346069a665944b6970f3c88167a58
|
|
| MD5 |
efcbe33237c1b775b617b419e51abeab
|
|
| BLAKE2b-256 |
efa5cda2d857bbd5a34771c6800bd3abee4ad287123825842b3ff71e1c56575f
|
Provenance
The following attestation bundles were made for water_packer-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on henriasv/water-packer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
water_packer-0.2.3-py3-none-any.whl -
Subject digest:
682c9290787f63f2d23032d6a9bc8e5856f346069a665944b6970f3c88167a58 - Sigstore transparency entry: 863311375
- Sigstore integration time:
-
Permalink:
henriasv/water-packer@384c7c1a60ba16341af66d3b9e4ae4d12707cd06 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/henriasv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@384c7c1a60ba16341af66d3b9e4ae4d12707cd06 -
Trigger Event:
push
-
Statement type: