pyiron_atomistics
pyiron_atomistics copied to clipboard
How to turn off an automatically generated "fix" when using .calc_vcsgc() command
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.
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:)
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?
@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.
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!
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"
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.