Dear All,
I’m now trying to use “compute com” to get the location of mass center; then based on mass center, define spherical regions; after that doing GCMC insertion in that region. My command is as follows. However, I get the error of “Compute used in variable between runs is not current (…/variable.cpp:1363)”.
Could anyone tell me where is wrong and how to fix it?
Best wishes,
Sally
1 Like
computes must be “consumed” to have up-to-date data. yours is just defined but not used. hence the error.
axel.
Currently variables don’t invoke the compute_vector() (or per atom, scalar, etc.) method defined in the compute class; thus this error wall is in place to prevent undefined values from being placed in the variable. If you use the custom thermo style, https://lammps.sandia.gov/doc/thermo_style.html ,output with your compute id I think that should work with run 0 to call your compute and then the variable can access it.
Adrian Diaz
1 Like
Dear Axel and Adrian,
Thank you so much for your quick response. Followed by your suggestion, I changed my input as follows. After compute command, I thermo the result. However, I still get the same error after the command: “region inse sphere {cx} {cy} {cz} {radius}”.
Am I missing something? Thank you in advance for your help.
Best wishes,
Sally
Try putting themo_style before your first run 0 so its been invoked by a run by the time you define the region.
2 Likes
Dear Adrian,
Thank you so much for your kind help. It works now!!!
Best wishes,
Sally