This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from ase import Atoms | |
| from ase.io import write | |
| from ase.calculators.singlepoint import SinglePointCalculator | |
| # read in npz file | |
| in_filename = 'data.npz' | |
| out_filename = 'nequip-data.extxyz' | |
| data = np.load(in_filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from ase.io import read, write | |
| # outcar contanining one (single-point) or multiple (trajectory) DFT frames | |
| in_filename = './OUTCAR' | |
| out_filename = 'nequip-data.extxyz' | |
| # read all frames into a list of ase.Atoms objects | |
| all_atoms = read(in_filename, format='vasp-out', index=':') | |
| for curr_atoms in enumerate(all_atoms): |