-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Description
Hi there.
I've been playing around with some MD, in particular with NPT ensemble
and I think I found two issue/bugs.
- The "Schur" decomposition to transform the lattice into a upper triangular form does not work properly. The output cell is completely changed from the original
si_structure = Structure(
lattice=[[0, 2.73, 2.73], [2.73, 0, 2.73], [2.73, 2.73, 0]],
species=["Si", "Si"],
coords=[[0, 0, 0], [0.25, 0.25, 0.25]],
)
atoms = si_structure.to_ase_atoms()
schur_decomp, _ = schur(atoms.get_cell(complete=True), output="complex")
atoms.set_cell(schur_decomp.real, scale_atoms=True)
st_schur = AseAtomsAdaptor.get_structure(
atoms,
cls=Structure)
print(si_structure.lattice.abc)
print(st_schur.lattice.abc)
: (3.8608030252785492, 3.8608030252785492, 3.8608030252785492)
: (2.73, 5.460000000000001, 2.73)
An alternative approach that works is to use the ASE cell.standard_form() that uses a QR decomposition:
atoms = si_structure.to_ase_atoms()
print(atoms.cell.lengths())
print(atoms.cell[:])
atoms.set_cell(atoms.cell.standard_form("upper")[0])
print(atoms.cell[:])
print(atoms.cell.lengths())
: [3.86080303 3.86080303 3.86080303]
: [[0. 2.73 2.73]
: [2.73 0. 2.73]
: [2.73 2.73 0. ]]
: [[ 3.15233247 1.11451783 1.93040151]
: [-0. 3.3435535 1.93040151]
: [-0. 0. 3.86080303]]
: [3.86080303 3.86080303 3.86080303]
- the "berendsen" dynamcs is listed among the possible choices, but the default
ase_md_kwargs
include theexternalstress
which is only for NPT ase function, but not for NPTBerendsen, which actually require thecompressibilty
instead. Seeatomate2/src/atomate2/ase/md.py
Line 244 in 3672ac4
self.ase_md_kwargs["externalstress"] = self.p_schedule[0] * 1e3 * units.bar
Please, let me know if this makes sense, and I could provide a fix in case.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels