Skip to main content

Build and visualize complex crystalline nanoparticle architectures, including models on substrates, for materials science, X-ray data analysis, and electron microscopy research

Project description

pyNMB_banner

Most nanoparticles have a well-defined shape. The habit of a crystalline nanoparticle is dependent on its crystallographic form and growth conditions. Its properties depends on its size, shape, surface topology and composition, etc... Modeling nanoparticles at the atomic scale is a crucial preliminary step to evaluate their potential for various applications. However, the process of generating an initial conformation for modeling and simulation is not that easy. Several tools are already available, including in the python realm. But to the best of our knowledge, they do not give access to the fascinating diversity of shapes encountered at the nanoscale. pyNanoMatBuilder is a new python tool designed to create nanoparticle models from any crystal structure or atomically precise structures, i.e. magic numbers polyhedra.

Once a nanoparticle is built, pyNanoMatBuilder provides a complete toolkit for atomic-precision shape engineering, organized in six families:

Family Key functions
Planar sculpting applySlicing, remove_plane
Volume clipping clip_to_sphere, clip_to_cylinder, clip_to_ellipsoid, clip_to_cone
Tip shaping round_tip_in_direction, align_to_plane
Surface peeling peel_by_coordination, peel_by_shifted_ellipsoid
Symmetry & assembly apply_rotation, apply_reflection, replicate_by_rotation, replicate_by_reflection, applyTwist
Construction Solid Geometry cut_by, union_with, intersect_with, flush_inlay_with

What can you build?

Various atomic ordered arrangements can be obtained by instantiating specific classes:

  • crystalNPs builds crystal-based shapes — spheres, cubes, ellipsoids, cylinders, parallelepipeds, and more generally any Wulff construction. Users can upload any CIF file or use the built-in database. Pre-defined Wulff shapes are available, and custom Miller indices with surface energies can be specified. This works for any Bravais lattice.

  • platonicNPs, archimedeanNPs, catalanNPs and johnsonNPs generate atomically precise polyhedra such as icosahedra, decahedra and many other five-fold structures that Wulff constructions cannot produce.

  • the shape engineering tools can be combined to build complex morphologies that go well beyond simple convex shapes, including pentatwinned nanorods (bipyramids, walled bipyramids, double cones, rods, ellipsoids, capsules), concave nanoparticles (nanostars, octopods), or any user-defined custom geometry.

The crystal habits of the structures generated by pyNanoMatBuilder are summarized below:


Installation

Activate your python environment and run:

pip install pyNanoMatBuilder

Quick usage

Let's first make a sphere with a diameter of ~ 4 nm. This is the target size, but the measured size will be slightly different due to compound cristalline organization.

from pyNanoMatBuilder import crystalNPs as cyNP
from pyNanoMatBuilder import utils as pyNMBu

# Define parameters
sphere_diameter = [4] # Target diameter in nm
# Instantiate the Crystal object (Au fcc sphere)
AuNP = cyNP.Crystal(
    "Au fcc",
    size=sphere_diameter, 
    shape="sphere", 
    thresholdCoreSurface=1, 
    skipSymmetryAnalyzis=False, 
    noOutput=False
)

# Save the results in various formats
# The 'write' utility automatically creates the 'coords/' directory, if it does not exist
pyNMBu.write("coords/SphericalAuNP.xyz", AuNP.NP)                # Main coordinates
pyNMBu.write("coords/SphericalAuNP_CoreSurface.xyz", AuNP.NPcs)  # Core/surface model
pyNMBu.write("coords/SphericalAuNP.script", AuNP.jMolCS)         # JMOL visualization script

# Save unitcells
pyNMBu.write("coords/SphericalAuNP_uc.cif", AuNP.cif)            # The base unitcell
pyNMBu.write("coords/SphericalAuNP_sc.cif", AuNP.sc)             # The supercell used for shaping

See more explanations in the How to? Workflow Guides section of the Main Tutorial notebook

Main Tutorial: Open In Colab


PyPI version Documentation Status License Downloads

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

pynanomatbuilder-0.15.1.tar.gz (75.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pynanomatbuilder-0.15.1-py3-none-any.whl (64.1 MB view details)

Uploaded Python 3

File details

Details for the file pynanomatbuilder-0.15.1.tar.gz.

File metadata

  • Download URL: pynanomatbuilder-0.15.1.tar.gz
  • Upload date:
  • Size: 75.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for pynanomatbuilder-0.15.1.tar.gz
Algorithm Hash digest
SHA256 8067618da6ce8685e38907d333ff77a2207b1080b3d42328d4369ce9023b30af
MD5 b90098f8d1c30cd72ecdb786a394ae89
BLAKE2b-256 f46df6627bc75142b8fb25eca3335abec2dad9ee2559333eb8a83ca19f1f9a42

See more details on using hashes here.

File details

Details for the file pynanomatbuilder-0.15.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pynanomatbuilder-0.15.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5397178d97f500ce08f3a86d17566ef613b184352e57594d8ca2f365b793c55c
MD5 b334f8b7928a135d32048516b25d9e3e
BLAKE2b-256 94c59ce1cdbb452c6fc0156ba86cd42f354d8ba3381dc856340d7b01d306c9f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page