|
15 | 15 | per_atom_dtype = np.dtype(
|
16 | 16 | [
|
17 | 17 | ("numbers", np.uint8),
|
18 |
| - ("positions", np.float32, (3,)), |
19 |
| - ("forces", np.float32, (3,)), |
| 18 | + ("positions", np.float64, (3,)), |
| 19 | + ("forces", np.float64, (3,)), |
20 | 20 | ]
|
21 | 21 | )
|
22 | 22 |
|
@@ -97,7 +97,7 @@ def __init__(
|
97 | 97 | identifier (Optional[int], optional): Unique identifier for the geometry. Defaults to None.
|
98 | 98 | """
|
99 | 99 | self.per_atom = per_atom.astype(per_atom_dtype) # copies data
|
100 |
| - self.cell = cell.astype(np.float32) |
| 100 | + self.cell = cell.astype(np.float64) |
101 | 101 | assert self.cell.shape == (3, 3)
|
102 | 102 | if order is None:
|
103 | 103 | order = {}
|
@@ -613,28 +613,28 @@ def create_outputs(quantities: list[str], data: list[Geometry]) -> list[np.ndarr
|
613 | 613 | arrays = []
|
614 | 614 | for quantity in quantities:
|
615 | 615 | if quantity in ["positions", "forces"]:
|
616 |
| - array = np.empty((nframes, max_natoms, 3), dtype=np.float32) |
| 616 | + array = np.empty((nframes, max_natoms, 3), dtype=np.float64) |
617 | 617 | array[:] = np.nan
|
618 | 618 | elif quantity in ["cell", "stress"]:
|
619 |
| - array = np.empty((nframes, 3, 3), dtype=np.float32) |
| 619 | + array = np.empty((nframes, 3, 3), dtype=np.float64) |
620 | 620 | array[:] = np.nan
|
621 | 621 | elif quantity in ["numbers"]:
|
622 | 622 | array = np.empty((nframes, max_natoms), dtype=np.uint8)
|
623 | 623 | array[:] = 0
|
624 | 624 | elif quantity in ["energy", "delta", "per_atom_energy"]:
|
625 |
| - array = np.empty((nframes,), dtype=np.float32) |
| 625 | + array = np.empty((nframes,), dtype=np.float64) |
626 | 626 | array[:] = np.nan
|
627 | 627 | elif quantity in ["phase"]:
|
628 | 628 | array = np.empty((nframes,), dtype=(np.unicode_, max_phase))
|
629 | 629 | array[:] = ""
|
630 | 630 | elif quantity in ["logprob"]:
|
631 |
| - array = np.empty((nframes, nprob), dtype=np.float32) |
| 631 | + array = np.empty((nframes, nprob), dtype=np.float64) |
632 | 632 | array[:] = np.nan
|
633 | 633 | elif quantity in ["identifier"]:
|
634 |
| - array = np.empty((nframes,), dtype=np.int32) |
| 634 | + array = np.empty((nframes,), dtype=np.int64) |
635 | 635 | array[:] = -1
|
636 | 636 | elif quantity in order_names:
|
637 |
| - array = np.empty((nframes,), dtype=np.float32) |
| 637 | + array = np.empty((nframes,), dtype=np.float64) |
638 | 638 | array[:] = np.nan
|
639 | 639 | else:
|
640 | 640 | raise AssertionError("missing quantity in if/else")
|
|
0 commit comments