Skip to content

[Bug]: Seemingly unnecessary upper triangular transformation in NVT MD #188

@Andrew-S-Rosen

Description

@Andrew-S-Rosen

Email (Optional)

No response

Version

main

Which OS(es) are you using?

  • MacOS
  • Windows
  • Linux

What happened?

matcalc/src/matcalc/_md.py

Lines 199 to 208 in aea727d

if ensemble in ("nvt", "nvt_nose_hoover"):
self._upper_triangular_cell(atoms)
return NoseHooverChainNVT(
atoms,
timestep_fs,
tdamp=taut,
temperature_K=self.temperature,
logfile=self.logfile,
loginterval=self.loginterval,
)

When calling NoseHooverChainNVT, an upper triangular cell is made. But I do not see anything in the ASE documentation requiring this. Indeed, the matcalc documentation itself acknowledges this is for the NPT implementation.

matcalc/src/matcalc/_md.py

Lines 320 to 327 in aea727d

def _upper_triangular_cell(self, atoms: Atoms) -> None:
"""
Transforms the cell of the given atoms object to an upper triangular form if it is not already,
as required by the Nose-Hoover NPT implementation.
Parameters:
atoms (Atoms): ASE atoms object.
"""

I believe this should be modified.

Code snippet

Log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions