pyiron / pyiron_atomistics

pyiron_atomistics - an integrated development environment (IDE) for atomistic simulation in computational materials science.
https://pyiron-atomistics.readthedocs.io
BSD 3-Clause "New" or "Revised" License
42 stars 15 forks source link

LCHARG is wrongly handled with `retain_charge_density` #1513

Closed dhoulek closed 1 month ago

dhoulek commented 1 month ago

Summary

The keys retain_charge_density in calc_minimize, calc_static and calc_md in vasp/base.py wrongly handle the VASP tag. The tag is written only when retain_charge_density=True; otherwise, no tag is written to INCAR. In that case, a default value is used, which is, however, TRUE. Therefore, the CHGCAR is always written.

pyiron Version and Platform

0.5.3 Linux, but should also apply to the current stable version on github

Expected Behavior

For retain_charge_density=False, a tag LCHARG=.FALSE. is written to INCAR. For retain_charge_density=True, no tag is written and default behavior is invoked (CHGCAR is written). Or, LCHARG tag is explicitly written with .TRUE. value.

Actual Behavior

For retain_charge_density=False, no LCHARG tag is written to INCAR, and hence default behavior (LCHARG=.TRUE.) is invoked.

Further Information, Files, and Links in vasp/base.py: lines 1069-1070 lines 1103-1104 lines 1152-1153

pmrv commented 1 month ago

Thanks for the report!

I'm working a on fix in #1514, but in the mean time you can use

job.input.incar['LCHARG'] = '.FALSE.'
jan-janssen commented 1 month ago

@dhoulek The new version is now available on conda https://anaconda.org/conda-forge/pyiron_atomistics you can install it using:

conda install -c conda-forge pyiron_atomistics=0.6.10