Introduction to atomman: crystal loading
Lucas M. Hale, lucas.hale@nist.gov, Materials Science and Engineering Division, NIST.
1. Introduction
The relaxed_crystal records found in the NIST Interatomic Potentials Repository database (https://potentials.nist.gov/) define unit cells for crystal structures that have been relaxed on a per-potential basis. The ‘crystal’ load option allows Systems to be constructed based on the information in these records. The information can be loaded either from a local copy of the database or the remote database.
Updated version 1.4.0. Query parameters and database options updated to be in line with potentials version 0.3.0.
Library Imports
[1]:
# Standard Python libraries
import datetime
# http://www.numpy.org/
import numpy as np
import atomman as am
import atomman.unitconvert as uc
# Show atomman version
print('atomman version =', am.__version__)
# Show date of Notebook execution
print('Notebook executed on', datetime.date.today())
atomman version = 1.4.11
Notebook executed on 2024-04-29
2. atomman.load(‘crystal’)
Accesses the potentials database to retrieve a relaxed_crystal record and generate a unit cell System based on it.
Query parameters
name (str or list) The record name(s) to parse by. For relaxed crystal records, the names should correspond to key.
key (str or list, optional) UUID4 key(s) to search for. Each entry has a unique random-generated UUID4 key.
method (str or list or None, optional) The relaxation method used. Allowed values are dynamic, static and box. Default value is dynamic (the most rigorous relaxation method). All will be loaded if set to None.
standing (str or list or None, optional) “good” records are the unique crystals found with the most rigorous relaxation, and with known prototypes over DFT structures. “bad” are records filtered out, usually for being duplicates. Default value is “good”. All will be loaded if set to None.
family (str or atomman.library.CrystalPrototype or list, optional) The crystal family associated with the relaxed crystal - either crystal prototype name or MP/OQMD database entry name.
parent_key (str or list, optional) The UUID4 key(s) assigned to the calculation that the record is based on.
potential (atomman.lammps.Potential or list, optional) A loaded LAMMPS potential object to limit the search by.
potential_LAMMPS_id (str or list, optional) The id for a LAMMPS implemented potential to limit the search by.
potential_LAMMPS_key (str or list, optional) The UUID4 for a LAMMPS implemented potential to limit the search by.
potential_id (str or list, optional) The id for a potential to limit the search by.
potential_key (str or list, optional) The UUID4 for a potential to limit the search by.
symbols (str or list, optional) Element symbols in the crystal to limit the search by.
natypes (int or list, optional) The number of unique element model symbols in the crystal to limit the search by.
natoms (int or list, optional) The number of unique atoms in the crystal’s unit cell to limit the search by.
Database option parameters
database (atomman.library.Database, optional) A pre-defined Database object to use. If not given, will initialize a new Database object. Passing in a database can save time if multiple calls are made for the same record type.
localpath (str, optional) The local library path to use when initializing a new Database. IF not given, will use the default localpath. Ignored if database is given.
local (bool, optional) Indicates if the Database object is to look for local records. Default is True. Ignored if database is given.
remote (bool, optional) Indicates if the Database object is to look for remote records. Default is True. Ignored if database is given.
refresh_cache (bool, optional) If the local database is of style “local”, indicates if the metadata cache file is to be refreshed. If False, metadata for new records will be added but the old record metadata fields will not be updated. If True, then the metadata for all records will be regenerated, which is needed to update the metadata for modified records.
verbose (bool, optional) If True, info messages will be printed during operations. Default value is False.
Returns
system (atomman.System) The system object generated from the relaxed crystal.
[3]:
ucell = am.load('crystal', potential_id='2003--Zope-R-R-Mishin-Y--Al', family='A1--Cu--fcc', symbols=['Al'], remote=False)
print(ucell)
Multiple matching record retrieved from local
# family symbols alat Ecoh method standing
1 A1--Cu--fcc Al 4.0500 -3.3539 dynamic good
2 A1--Cu--fcc Al 4.0500 -3.3539 dynamic good
Please select one: 1
avect = [ 4.050, 0.000, 0.000]
bvect = [ 0.000, 4.050, 0.000]
cvect = [ 0.000, 0.000, 4.050]
origin = [ 0.000, 0.000, 0.000]
natoms = 4
natypes = 1
symbols = ('Al',)
pbc = [ True True True]
per-atom properties = ['atype', 'pos']
id atype pos[0] pos[1] pos[2]
0 1 0.000 0.000 0.000
1 1 0.000 2.025 2.025
2 1 2.025 0.000 2.025
3 1 2.025 2.025 0.000