calphy icon indicating copy to clipboard operation
calphy copied to clipboard

Need support for newton off requirement when using pair_style nequip

Open ChengQIAN93 opened this issue 5 months ago • 6 comments

Dear Calphy developers, thank you for making such a strong and easy-to-use tool.

I recently had a small problem when using pair_style nequip in LAMMPS through Calphy. The NequIP pair style requires "Newton off," but LAMMPS by default uses "Newton on." I'm not sure where in Calphy's workflow this setting should be changed to automatically require the Newton flag when nequip potentials are selected. What's the best way to handle this requirement?

ChengQIAN93 avatar Jul 15 '25 11:07 ChengQIAN93

@ChengQIAN93 thanks for the issue. You can use this option: https://calphy.org/en/latest/inputfile.html#init-commands

srmnitc avatar Jul 15 '25 18:07 srmnitc

Thanks for your help, after adding the init-command keyword calphy works fine. But I have two more questions and would like to get your guidance.

  1. when using a LAMMPS data file specified through lattice: alpha.data in input.yaml, the repeat parameter appears to be completely ignored. Despite setting values like repeat: [2, 2, 2], the simulation box maintains the original dimensions from the data file without any replication.

  2. when using script_mode: True to generate SLURM scripts for efficient GPU distribution, running the submitted job fails with an AttributeError: 'Calculation' object has no attribute '_ghost_element_count'. The traceback points to line 302 in solid.py during the run_minimal_averaging process.

here is the input.yaml I used.

Image Image

here is the script generated by the Calphy

Image

here is the error when I run the script Image

ChengQIAN93 avatar Jul 16 '25 03:07 ChengQIAN93

Thanks again!

  • If a datafile is provided, the repeat parameter is ignored. This is the expected behaviour.
  • I fixed the issue in #177 , updating should help.

srmnitc avatar Jul 16 '25 06:07 srmnitc

Thank you for the update on Calphy. The script mode is working very well, and LAMMPS can run on separate GPU cards. However, I didn't find the temperature_sweep.dat file in any of the folders. Do I need to run additional commands? Thank you in advance, and I look forward to your reply.

This is what Calyphy export in the folder.

Image

ChengQIAN93 avatar Jul 21 '25 08:07 ChengQIAN93

@ChengQIAN93 Unfortunately the script mode is not yet available for temperature sweep. One way twould be to do calculations for an array of temperatures one by one. Further expansion of the scipt mode is planned, but would need about 2 months or so.

srmnitc avatar Jul 21 '25 12:07 srmnitc

@srmnitc Thanks for the reply, I'll keep an eye on Calphy for updates!

ChengQIAN93 avatar Jul 22 '25 01:07 ChengQIAN93