Skip to content

Error with get_stress in preprocess.py when enabling stress calculation #1

@yhson135

Description

@yhson135

First, I would like to express my gratitude for providing the dataset. I have a few questions regarding the preprocessing.

When attempting to run the preprocessing script ./run_preprocess_data.sh with the stress calculation enabled, an error occurs in get_stress from the ASE package, indicating that the "stress" property is not implemented by the calculator currently in use.

The question is,

  1. Is there a way to resolve this error?
  2. Is the stress calculation required for all models? I was able to run the SCN and Equiformer V2 models with slight modifications, but I'm concerned about potential hidden errors.
  3. Additionally, is stress calculation needed for further evaluations or analyses?

Thank you.

Traceback (most recent call last):
File "/opt/.pycharm_helpers/pydev/pydevd.py", line 1483, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/opt/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/yh/scripts/preprocess_data/preprocess.py", line 145, in
write_extxyz_to_lmdb(args)
File "/yh/scripts/preprocess_data/preprocess.py", line 118, in write_extxyz_to_lmdb
data = a2g.convert(snapshot)
File "/yh/src/preprocessing/atoms_to_graphs.py", line 123, in convert
python-BaseException
stress = torch.Tensor(voigt_6_to_full_3x3_stress(atoms.get_stress(apply_constraint=False))).unsqueeze(0)
File "/usr/local/lib/python3.8/dist-packages/ase/atoms.py", line 820, in get_stress
stress = self._calc.get_stress(self)
File "/usr/local/lib/python3.8/dist-packages/ase/calculators/abc.py", line 26, in get_stress
return self.get_property('stress', atoms)
File "/usr/local/lib/python3.8/dist-packages/ase/calculators/singlepoint.py", line 46, in get_property
raise PropertyNotImplementedError(
ase.calculators.calculator.PropertyNotImplementedError: The property "stress" is not available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions