Skip to main content

Atomic Graph ATtention networks for predicting atomic energies and forces.

Project description

AGAT (Atomic Graph ATtention networks)

DOI GitHub PyPI - Downloads PyPI - Wheel GitHub tag (with filter)

Installation

Install with conda environment

  • Create a new environment
conda create -n agat python==3.10
  • Activate the environment
conda activate agat
  • Install package
pip install agat
conda install -c dglteam/label/cu118 dgl

Using AGAT

The documentation of AGAT API is available.

Quick start

Prepare VASP calculations

Collect paths of VASP calculations

  • We provided examples of VASP outputs at VASP_calculations_example.
  • Find all directories containing OUTCAR file:
    find . -name OUTCAR > paths.log
    
  • Remove the string 'OUTCAR' in paths.log.
    sed -i 's/OUTCAR$//g' paths.log
    
  • Specify the absolute paths in paths.log.
    sed -i "s#^.#${PWD}#g" paths.log
    

Build database

from agat.data import AgatDatabase
if __name__ == '__main__':
    ad = AgatDatabase(mode_of_NN='ase_dist', num_of_cores=2)
    ad.build()

Train AGAT model

from agat.model import Train
at = Train()
at.fit_energy_model()
at.fit_force_model()

Model prediction

from agat.app import GatApp
energy_model_save_dir = os.path.join('out_file', 'energy_ckpt')
force_model_save_dir = os.path.join('out_file', 'force_ckpt')
graph_build_scheme_dir = 'dataset'
app = GatApp(energy_model_save_dir, force_model_save_dir, graph_build_scheme_dir)
graph, info = app.get_graph('POSCAR')
energy = app.get_energy(graph)
forces = app.get_forces(graph)

Geometry optimization

from ase.io import read
from ase.optimize import BFGS
from agat.app import GatAseCalculator
from agat.default_parameters import default_hp_config
poscar = read('POSCAR')
calculator=GatAseCalculator(energy_model_save_dir,
                            force_model_save_dir,
                            graph_build_scheme_dir)
poscar = Atoms(poscar, calculator=calculator)
dyn = BFGS(poscar, trajectory='test.traj')
dyn.run(**default_hp_config['opt_config'])

Change log

Please check Change_log.md

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

agat-7.12.2.1.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

agat-7.12.2.1-py3-none-any.whl (63.0 kB view details)

Uploaded Python 3

File details

Details for the file agat-7.12.2.1.tar.gz.

File metadata

  • Download URL: agat-7.12.2.1.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for agat-7.12.2.1.tar.gz
Algorithm Hash digest
SHA256 e90fc2418b4ee946964f06e77cdf7dc55bd334423e23ef46c6a2289241154833
MD5 2652bb7b36f0c74900672585dd4b6d3f
BLAKE2b-256 b6c616ff38188b7f126c280d7c6239ce8f25ab35e12f85b0477f0112b0a38c84

See more details on using hashes here.

File details

Details for the file agat-7.12.2.1-py3-none-any.whl.

File metadata

  • Download URL: agat-7.12.2.1-py3-none-any.whl
  • Upload date:
  • Size: 63.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for agat-7.12.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6158a8dd80cef995fc124f67f45acea330ad9e82d30044a9e5d7770ac5ba5f64
MD5 649f666b639c9c7bddc109fe8a17872a
BLAKE2b-256 af0e81af1d441f9c889c46ff725ccfff1a74abe42039b885b8f4c4715e78f642

See more details on using hashes here.

Supported by

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