Skip to main content

Processing and visualization of atomic coordinates; featurizing atomic structures

Project description

AtomicAI

AtomicAI is a Python-based package for building machine learning models in the field of computational materials science. It can be used for machine learning force field generation, atomic structure classifications based on temperature, defects, phase, and more.

Table of Contents

  1. Features
  2. Installation
  3. Requirements
  4. Usage
  5. Examples
  6. Documentation
  7. Contributing
  8. License
  9. Authors
  10. Contact
  11. Cite

Features

AtomicAI offers a wide range of features for computational materials science:

Analysis

  • Processing and visualization of atomic coordinates in various file formats (CIF, VASP, XYZ, Conquest, etc.)
  • Utilizes 'ase' library for reading and writing structure files
  • Radial Distribution Function (RDF) calculation and analysis
  • Structure analysis tools

Data Processing

  • Classification of atoms in trajectory files
  • File format conversion between different atomic structure formats

Machine Learning

  • Featurization of atomic structures
  • Dimension reduction techniques (PCA, LPP, TsLPP, TsNE, UMAP)
  • Machine Learning Force Field (MLFF) generation
  • Descriptor generation for atomic environments and forces

Clustering and Visualization

  • Various clustering methods
  • Data plotting and visualization tools for RDF, molecular dynamics statistics, and clustering results

Installation

Install AtomicAI using pip:

pip install AtomicAI

Requirements

AtomicAI requires Python 3.7 or higher. Other dependencies will be automatically installed during the pip installation process.

Usage

AtomicAI provides several command-line tools for various tasks. Here are some examples:

File Conversion

  • cq2vasp: Convert Conquest files to VASP format
  • xyz2vasp: Convert XYZ files to VASP format
  • vasp2cif: Convert VASP files to CIF format
  • vasp2xyz: Convert VASP files to XYZ format
  • vasp2lmp_data: Convert VASP files to LAMMPS data format
  • vasp2cq: Convert VASP files to Conquest format
  • lmp2vasp: Convert LAMMPS trajectory to VASP format
  • cif2cq: Convert CIF files to Conquest format
  • cq2cif: Convert Conquest files to CIF format
  • ase_traj2xyz_traj: Convert ASE trajectory to XYZ trajectory

Structure Manipulation

  • supercell: Create supercell structures
  • build_interface: Build interfaces between materials
  • wrap2unwrap: Convert wrapped coordinates to unwrapped

Analysis

  • rdf: Calculate Radial Distribution Function
  • structure_analysis: Perform various structural analyses

Visualization

  • plot_rdf_data: Plot RDF data
  • plot_md_stats: Plot molecular dynamics statistics
  • plot_vasp_md: Plot VASP molecular dynamics results
  • plot_lammps_md: Plot LAMMPS molecular dynamics results
  • plot_clusters: Visualize clustering results

Machine Learning

Atomic Descriptors — generate_descriptors

Computes locally-averaged atomic fingerprints (LAAF) for all element pairs in a trajectory.

generate_descriptors trajectory.xyz [--descriptor TYPE [TYPE ...]] [--n-eta N]
Option Default Description
--descriptor / -d ACSF_G2 ACSF_G2G4 SOAP One or more descriptor types (see table below)
--n-eta / -n 50 Number of eta decay functions

Available descriptor types:

Type Description
ACSF_G2 Radial symmetry functions (Behler-Parrinello G2)
ACSF_G3 Cosine basis functions parameterised by kappa
ACSF_G4 Angular symmetry functions including the r_jk cutoff (Behler-Parrinello G4)
ACSF_G5 Angular symmetry functions without r_jk cutoff (G5 variant)
ACSF_G2G4 Combined radial (G2) + angular (G4) descriptor
ACSF_G2G4G5 Combined radial (G2) + angular G4 + angular G5 descriptor
SOAP Smooth Overlap of Atomic Positions (via DScribe)
MBSF Many-body symmetry functions (radial gr + angular ga)

Examples:

# G2 radial only, 60 eta functions
generate_descriptors traj.xyz --descriptor ACSF_G2 --n-eta 60

# Multiple descriptor types in one run
generate_descriptors traj.xyz --descriptor ACSF_G2G4 ACSF_G2G4G5 MBSF

# SOAP descriptor
generate_descriptors traj.xyz --descriptor SOAP

Output files are written to ./descriptors/ with naming convention <TYPE>_<rc>_<ra>_<elem1>_<elem2>.dat.

Force Descriptors — generate_force_descriptors

Generates force-projected descriptors for machine learning force field training.

generate_force_descriptors trajectory.xyz [--fp-type TYPE] [--rc R] [--n2b N] [--n3b N]
Option Default Description
--fp-type / -f Split2b3b_ss Fingerprint type: BP2b or Split2b3b_ss
--rc / -r 10.5 Cutoff radius in Angstrom
--n2b 20 Number of 2-body eta functions
--n3b 10 Number of 3-body eta functions

Available fingerprint types:

Type Description
BP2b 2-body Behler-Parrinello fingerprint
Split2b3b_ss Split 2-body + 3-body fingerprint (same species)

Examples:

# Default: Split2b3b_ss with 10.5 Å cutoff
generate_force_descriptors traj.xyz

# BP2b with shorter cutoff and more eta functions
generate_force_descriptors traj.xyz --fp-type BP2b --rc 8.0 --n2b 30

# Split2b3b with custom eta counts
generate_force_descriptors traj.xyz --fp-type Split2b3b_ss --rc 9.0 --n2b 25 --n3b 12

Output is written to ./descriptors/force_descriptors.dat.

Other ML Tools

  • laaf: Calculate LAAF descriptors
  • dim_reduction: Perform dimension reduction
  • dim_reduction_mpi: Perform parallel dimension reduction using MPI
  • pca: Perform Principal Component Analysis
  • lpp: Perform Locality Preserving Projection
  • optimize_tslpp_hyperparameters_without_prediction: Optimize TsLPP hyperparameters
  • optimize_tslpp_hyperparameters_with_prediction: Optimize TsLPP hyperparameters with prediction
  • predict_tslpp: Predict using optimized TsLPP model

Structure Building

  • build_multilayers: Stack multiple VASP structures into commensurate multilayer systems
  • build_constrained_multilayers: Build multilayers with lattice constraints
  • surfaces: Generate surface slabs for common Miller indices from a bulk structure

LAMMPS Input Generation

  • lammps_npt_inputs: Generate LAMMPS NPT input files
  • lammps_nvt_inputs: Generate LAMMPS NVT input files

For more details on any tool, run it with the --help flag.

Examples

(This section should be filled with basic examples of how to use the main features of AtomicAI. As the context doesn't provide specific examples, I'll leave this section for you to fill in with relevant use cases.)

Documentation

(Add a link to the full documentation when available. The context doesn't provide this information, so you may want to add it when documentation is ready.)

Contributing

We welcome contributions to AtomicAI! Please see our contributing guidelines for more information. (You may want to add a CONTRIBUTING.md file to your repository with detailed guidelines.)

License

AtomicAI is released under the MIT License. See the LICENSE.md file for details.

Authors

  • Selva Chandrasekaran Selvaraj

Contact

Cite

If you use AtomicAI in your research, please cite:

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

atomicai-0.4.0.tar.gz (110.2 kB view details)

Uploaded Source

Built Distribution

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

atomicai-0.4.0-py3-none-any.whl (159.0 kB view details)

Uploaded Python 3

File details

Details for the file atomicai-0.4.0.tar.gz.

File metadata

  • Download URL: atomicai-0.4.0.tar.gz
  • Upload date:
  • Size: 110.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for atomicai-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6b69d8bdb345534f6f4632c490cf9983b14f6dfaecfc199c1dcc75b32005489f
MD5 03dca89c9b6da0fb145ce45531e47a6f
BLAKE2b-256 2593d5569eaf2d93fb7a2ff2667f609e89ef386b2cb7c82920bded4a40b1edbd

See more details on using hashes here.

File details

Details for the file atomicai-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: atomicai-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 159.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for atomicai-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8053510d86ebfafd7d66f2dcc6735d80e1200a18f89153f5feabda5256cff6dd
MD5 adc861d5776ddad7d1292fc510689d8d
BLAKE2b-256 965f2a2ea0776bcaec76bc655d10479e16b21d444e57ff8e1c1791a7c65b223d

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