Skip to main content

SaNSDE

GitHub PyPI License

SaNSDE is a self-adaptive differential evolution with neighborhood search for finding low-energy structures of isolated nanoclusters. The whole workflow is built on ASE and accepts any ASE calculator object as the potential, so the same input works with DeePMD-kit models, asap3 potentials, or something you write yourself.

Install

As a command-line tool:

uv tool install sansde
# check that the tool is installed
uv tool list

It can also be installed into a Python environment for custom workflows:

uv pip install sansde

Quick start

sansde init                      # write params.json by default (can be renamed)
sansde check                     # sanity-check the setup
sansde run params.json           # background run, log in params.log

sansde init writes params.json with all defaults filled in. A minimal configuration looks like this:

{
  "SCRIPTS": ["from deepmd.calculator import DP"],
  "POTENTIAL": "DP(model=Path('/path/to/model.pth'))",
  "ELEMENT": "Au",
  "MIN_ATOM": 2,
  "MAX_ATOM": 20
}

Anything you leave out keeps its default. sansde check lists the systems that will be optimized and warns about missing initial structures or existing output files before anything is overwritten.

Potentials

POTENTIAL is an ASE calculator object, built from a Python expression after SCRIPTS has run. Any ASE calculator works; two common choices:

// DeePMD-kit (requires deepmd-kit)
"SCRIPTS": ["from deepmd.calculator import DP"],
"POTENTIAL": "DP(model=Path('/path/to/model.pth'))"

// Gupta (requires asap3; asap3 needs a cell, so set CELL as well)
"SCRIPTS": ["from sansde.calc import GuptaCalculator"],
"POTENTIAL": "GuptaCalculator({'Au': [10.229, 4.036, 0.2061, 1.790, 2.884]})",
"CELL": [60.0, 60.0, 60.0, 90.0, 90.0, 90.0]

USE_ZBL is on by default. It adds a short-range repulsion wall so atoms cannot collapse onto each other when the potential is evaluated outside the region it was trained for. Usually only some machine-learning potentials need it; turn it off for potentials that already handle close contacts.

Alloy clusters

Give a second element and the total cluster size to search fixed-composition alloys:

"ELEMENT": "Au",
"ELEMENT2": "Ag",
"TOTAL_ATOM": 24

MIN_ATOM..MAX_ATOM then count only the Au atoms; the rest of the cluster is Ag, so TOTAL_ATOM must be larger than MAX_ATOM. Output files use the chemical formula, for example Ag12Au12_best.xyz.

Results

  • best/{formula}_best.xyz — best and next-best clusters found, ordered from higher to lower energy (best last).
  • better/{formula}_better.xyz — best and next-best clusters found, excluding the initial ones.
  • Populations/ — population snapshots; point INIT_POP_DIR at them to continue.
  • params.csv — per-generation statistics, params.log — the run log.

With "ROUND": 2 or more, each round writes its own best1/, best2/, ... and starts from the previous round's structures.

Analysis

The analysis commands read ASE JSON structures, one structure per file, such as the merged_json/ folder written by sansde xyz2vasp.

sansde analyse -i merged_json -o analysis.csv     # energies, shapes, similarity
sansde radial -i merged_json -o radial.csv        # radial layer structure
sansde cn -i merged_json -o coordination.csv      # coordination numbers

Add --plot for PNG figures (also svg or eps), --ref to compare against reference data, and --s2 for the angle similarity.

VASP export

sansde xyz2vasp config.json turns the best structures into ready-to-submit VASP task directories, using a template folder that holds INCAR, KPOINTS and optionally POTCAR:

{
  "input": ["best"],
  "template": "vasp_template",
  "output": "relax.Au"
}

License

SaNSDE is licensed under the MIT

Metadata

Release files for sansde 0.3.20

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

Source distribution (sdist)

Source distribution for sansde 0.3.20
File Size Uploaded Provenance Actions
sansde-0.3.20.tar.gz 65.4 kB Without provenance Details for sansde-0.3.20.tar.gz

Built distribution (wheel)

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

Total release size: 135.7 kB

Release files / sansde-0.3.20.tar.gz

Download URL sansde-0.3.20.tar.gz
Size 65.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f854117df12d7cc3306513ac7065f9a649690d023ff963e4fd18a2de021e6a93
BLAKE2b-256 checksum
How to use checksums
374c2377d9c201bdc773ba9f766b0154b4f62821f6bcd96501dd1d645406c36a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / sansde-0.3.20-py3-none-any.whl

Download URL sansde-0.3.20-py3-none-any.whl
Size 70.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
022318004957d3a2e427a5763389288ca37a115402681978b40e9386c5f44c69
BLAKE2b-256 checksum
How to use checksums
79ecc31247d8b8d606722761e8543eb6f3b10bc830f13fa5c6da5bbab28450f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for sansde 0.3.20

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