1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
# fmt: off
import numpy as np
import pytest
from ase import Atoms
@pytest.fixture()
def lammpsdata_file_path(datadir):
return datadir / 'lammpsdata_input.data'
@pytest.fixture()
def atoms():
# Some constants used to initialize things
CELL_LENGTH = 102.3776
NATOMS = 3
MAX_VEL = 0.1
atoms_attrs = {
'cell': [CELL_LENGTH] * 3,
'positions': np.random.RandomState(17).rand(NATOMS, 3) * CELL_LENGTH,
'charges': [0.0] * NATOMS,
'velocities': np.random.RandomState(41).rand(NATOMS, 3) * MAX_VEL,
'numbers': [1] * NATOMS,
'pbc': [True] * 3,
}
return Atoms(**atoms_attrs)
|