logsdail / carmm

Scripts for creation, manipulation and analysis of geometric and electronic structure of molecular models
GNU General Public License v3.0
5 stars 18 forks source link

compute_forces default setting in ASE 3.23 #186

Open robinsonmt1 opened 1 day ago

robinsonmt1 commented 1 day ago

Currently, the default setting for compute_forces in aims_calculator/get_aims_calculator is the string "true", which seemed to work in ASE 3.22. However, in ASE 3.23, relying on this default setting meant the resulting control.in was not readable and the calculation failed at set up. The control.in file produced the line "compute_forces true" rather than "compute_forces .true." as a boolean. The problem is fixed when compute_forces is explicitly set to the boolean True.

Therefore, I think we need to change the default setting depending on the version, setting it to the string "true" for ASE 3.22 or the boolean True for ASE 3.23. Alternatively, if the boolean True also works for ASE 3.22, it could just be changed to the boolean (although the fact that it has been set to the string in the first place makes me think this won't work).

logsdail commented 1 day ago

Created a branch and tried this. Inside the calculator definition we split between ASE 3.22 and 3.23, so if setting compute_forces=True doesn't work we can just do some logic for ASE v3.23 to pick a Boolean based on the string.