pyiron_atomistics icon indicating copy to clipboard operation
pyiron_atomistics copied to clipboard

How to turn off an automatically generated "fix" when using .calc_vcsgc() command

Open lfzhu-phys opened this issue 2 years ago • 6 comments

I am using .calc_vcsgc() command in pyiron. In LAMMPS it is possible to carry out pure lattice MC simulations by setting every_nsteps to 1 and not defining an integration fix such as NVE, NPT etc. However, the command in pyiron will automatically generate this fix. How to simply delete this fix in the input.control?

Thanks a lot in advance.

lfzhu-phys avatar Sep 05 '23 08:09 lfzhu-phys

Currently, I can manually delete the fix in control.inp and run the pure MC job. If anyone has a more clever way, highly appreciate:)

lfzhu-phys avatar Sep 05 '23 12:09 lfzhu-phys

Hi @lfzhu-phys,

I'm not sure the best way to turn it off once it's there -- certainly your approach sounds reasonable -- but I like the idea of supporting lattice MC more formally.

I took a peek at the calc_vcsgc(...) command, and all we do is first invoke .calc_md(...) and then add all the VC-SGC. This might turn out to be naive, but I think all we need to do is add a new argument, run_lattice_mc: bool = False, and then in the function body add an if-else clause such that we instead invoke calc_static when this is True.

Would you be interested in opening a PR that does this?

liamhuber avatar Sep 05 '23 14:09 liamhuber

@Liam, thanks a lot. I also think it would be great to have the lattice MC more formally. Yes, I am very much interested in opening a PR, but I have no experience about it:)) I am in a workshop now and will look into it when I am back to the office.

lfzhu-phys avatar Sep 05 '23 20:09 lfzhu-phys

Yes, I am very much interested in opening a PR, but I have no experience about it:)) I am in a workshop now and will look into it when I am back to the office

Super! Go ahead and take a crack at it when you have time; once the PR is opened (even if it's not working how you'd like) I'd be happy to lend a hand with any trouble you run into.

Have a good workshop!

liamhuber avatar Sep 05 '23 21:09 liamhuber

As discussed in the meeting today, the lines can be removed using:

del job.input.control["fix___ensemble"]

or replaced using:

job.input.control["fix___vcsgc"] = "all sgcmc 50 0.1 400.0 -0.55"

jan-janssen avatar Sep 15 '23 17:09 jan-janssen

or replaced using:

job.input.control["fix___vcsgc"] = "all sgcmc 50 0.1 400.0 -0.55"

Since this requires explicit knowledge of the lammps docs for that fix to adjust swap fraction, etc, I think it would still be nice to have this wrapped as a pyiron lammps job method.

liamhuber avatar Sep 15 '23 17:09 liamhuber