I am using LAMMPS for simulating 25 chain of polymers along with 400 water molecules, 250 hydronium ions and 10 oxygen molecules. To prepare the system, I have to impose several series of ensembles and use restart file for each of these ensemble runs, each of these runs have specific run time and timestep. Herein, I have first ran NVT ensemble at 300 k ( and then used the restart file for the next step which is NPT ensemble at 1 atm and 600 k for 3000 ps. So, my problem now is that in the second step, ensemble does not unfix, even though, I have used unfix command after 3000 ps run in my input file. I need to unfix this ensemble at this stage to use its final result for the next stage, which is another NVT ensemble.
Also, the funny part is that when I use a shorter run time (100 ps), it gets unfixed!
P.S: I am using Graham cluster to run my files and after each 10 hr (about 1000 ps), I have to restart the files.
Could anyone please help with this issue?
Here is my input file in case is needed;
echo both
units real
dimension 3
boundary p p p
atom_style full
restart 50 restart
# Pair_Coefficient ..............................................................................................................................................
pair_style lj/class2/coul/long 10 15
dielectric 1.0
bond_style class2
angle_style class2
dihedral_style class2
improper_style class2
#read_data System.data
read_restart System.data
#info coeffs out log
#...................................................................................................................................................................................
kspace_style pppm 0.0001
neighbor 2 bin
neigh_modify every 1 delay 0 check yes
#velocity all create 300.0 497 dist gaussian
#minimize 1.0e-6 1.0e-6 5000 5000
write_data Nafion_3landa.data
timestep 1
thermo 1000
thermo_style custom step cpu temp pe ke epair ecoul etotal density lx ly lz
# reset timestep
#reset_timestep 0
# saving trajectories
dump 1 all xyz 1000 System_2.xyz
#Exports ......................................................................................................................................
#nvt run
#fix 2 all nvt temp 300.0 300.0 50.0
#run 400000
#undump
#unfix 2
#..............................................................................................................................................
#raise temperature
#fix 3 all nvt temp 300.0 600 50
#write_restart restart-1.equil
#run 1000000
#undump 1
#unfix 3
#..............................................................................................................................................
#run at high temperature for 3000ps
fix 4 all npt temp 600 600 50 iso 1 1 1000
write_restart restart-1.equil
#fix nvt all nvt temp 600.0 600 50
run 3000000
undump 1
unfix 4
Thank you for your reply @stamoor. I modified the text.
The system has been running for more than 6000 ps and it still has not unfixed. I tried to put it on run another time, the run has been going on for 3350 ps and still not unfixed. I mean the “fix npt 4” has not stopped after 3000 ps. Despite the fact that I used “unfix” command.
As I mentioned, I tried to check for a shorter run time of for example 100 ps, and it did get unfixed, but for a longer run time I face this issue. The weird part is that for previous NVT run, which was 1000 ps, it got unfixed, as well. I am suspicious about using restart for this specific ensemble several times (3 time) as the run time is rather longer and the cluster that I am using has the maximum run time of 10 hr. (about 1000 ps, which was the same as previous NVT run) Could this be the issue? if yes, what should I do?
Thank you for your response @simongravelle . I mean “fix 4 npt” is still on the run and has not stopped (“unfix 4” is not working). In fact this fix is working on my system for more than 3000 ps (which is my expected run time for this fix).
But not correctly. You need to add triple back quotes (```) and add them on a line by themselves. It looks like you did neither.
No. Unless your cluster is managed and set up very badly, the time for writing restarts is negligible.
What does make be a difference is that with fix npt your computational effort increases: you need to compute/tally the viral in every step and not just when you have thermodynamic output, you need to rescale all positions and adjust the box size, that also means you need to do more work when using a space style.
If you have a walltime limit and want a run command to stop before your time expires, you can set a timeout with the timer command.
You mean you expect all the forces to be zero and the temperature to remain exactly the same since you removed fix npt? Basically nothing will move because there is no time integrator?
Because you are reading from a restart file, there could be other fixes still active that are defined in the restart. We’d need to see the full log output.
I think you are just messing up with the restart files.
In your input script, you use:
So I assume that System.data is a binary restart and not a plain-text data file. Also, you use the write_restart command before the simulations runs, which is useless if the goal is to restart the simulation from those files.
Luckily, your input script also contains this command:
that writes a binary restart file that is updated throughout the simulation (I believe you waste a lot of time by asking for I/O every 50 steps, but you are the computational guy). So the only logical assumption is that you have renamed the file restart to System.data, and restarted the simulation from there. If this is the case, then the simulation step is also inherited. As your simulation has surpassed step 6 000 000, only you know how many times you have restarted your simulation, which was the previous step, and the actual thermal history of your sample.
What is the first line and last line of the thermo output? Please enclose those lines with triple backquotes (or press the </> button) or I will hack the Graham cluster and delete all your files
Dear @hothello thank you for your response. I know that the run is going on since I can see the changes in the properties of my system (e.g. density). However, I am not sure as you mentioned if i was correctly placed the write_restart command. Based on your notes, should I put this command after the run command?
Also, I am not sure how can I post the thermo output, as the website does not allow me to share this huge amount of data. But the following lines are the first and last line of thermo output, respectively for the last restart file:
With the input script from your first post, LAMMPS reads in your restart file, written at step 4824250. Then you have put a command to run 3000000, which would terminate at step 7824250. Since your run has not yet reached that step, it is still going. What were you expecting would happen instead?
Dear @srtee, thank you for your response. The output that I posted is only for the last restart file. In fact, this is the result after 6 times running the restart file. The very first and last results of thermo output would be as below:
If you are using the exact script that you posted in the first post, then this is not surprising. The command run X asks LAMMPS to run for X steps, not “keep running until the number of steps, including whatever step number was read in from a previous file, hits X”. If you want that behaviour you should check the manual and look for the keyword upto.