MLFF NPT Pressure Question (solid/liquid interface)
Moderators: Global Moderator, Moderator
-
- Newbie
- Posts: 23
- Joined: Tue Jun 11, 2024 11:01 pm
MLFF NPT Pressure Question (solid/liquid interface)
Hi everyone,
I am currently doing machine learning FF learning for a solid/liquid interface and have some questions about using NPT and as well as the pressure.
So I am currently doing two different systems, one system I call the fixed system and the other I call the free system.
For the fixed system I have fixed the x and y and let the z fluctuate. For the free system however I have let everything be free and will keep an eye on the volume/shape of the system. I was wondering if anyone has any experience with solid/liquid interface with NPT and which one they found to be the best?
The second question I have is I want to keep the pressure relatively constant at 150 bars and 600 bars. So for the PSTRESS input I but 0.15 and 0.6, but because it is very close to 0 it goes to the negatives and seems to fluctuate a bit. I was wondering if there is a way to keep the pressure more constant and if I could change the units from kB to bars so that the values are not so small?
Any feedback/tips would be greatly appreciated and if you require any input files etc. please let me know
Thanks in advance,
Jess
I am currently doing machine learning FF learning for a solid/liquid interface and have some questions about using NPT and as well as the pressure.
So I am currently doing two different systems, one system I call the fixed system and the other I call the free system.
For the fixed system I have fixed the x and y and let the z fluctuate. For the free system however I have let everything be free and will keep an eye on the volume/shape of the system. I was wondering if anyone has any experience with solid/liquid interface with NPT and which one they found to be the best?
The second question I have is I want to keep the pressure relatively constant at 150 bars and 600 bars. So for the PSTRESS input I but 0.15 and 0.6, but because it is very close to 0 it goes to the negatives and seems to fluctuate a bit. I was wondering if there is a way to keep the pressure more constant and if I could change the units from kB to bars so that the values are not so small?
Any feedback/tips would be greatly appreciated and if you require any input files etc. please let me know
Thanks in advance,
Jess
-
- Global Moderator
- Posts: 314
- Joined: Mon Sep 13, 2021 12:45 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Dear Jess,
We have some tips in the best-practice guide for machine-learning calculations here.
In particular, note that in MD simulation of liquids only the volume changes should be allowed, otherwise the cell may "collapse".
To constrain the shape you can use the ICONST file as described in the wiki.
The pressure can fluctuate a bit in NPT, but the average value should be fixed. Reducing the step size POTIM can help to reduce fluctuations.
Also, if you use ICONST, you could try using lower SHAKETOL to reduce the fluctuations.
We have some tips in the best-practice guide for machine-learning calculations here.
In particular, note that in MD simulation of liquids only the volume changes should be allowed, otherwise the cell may "collapse".
To constrain the shape you can use the ICONST file as described in the wiki.
The pressure can fluctuate a bit in NPT, but the average value should be fixed. Reducing the step size POTIM can help to reduce fluctuations.
Also, if you use ICONST, you could try using lower SHAKETOL to reduce the fluctuations.
-
- Newbie
- Posts: 23
- Joined: Tue Jun 11, 2024 11:01 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Hi Alexey,
Many thanks for the reply! Instead of using the ICONST I am instead in the INCAR using the tag: LATTICE_CONSTRAINTS = F F T
Would you recommend to use ICONST instead? I also have my POTIM to be 2 (but have my hydrogens weighing more). Would you recommend me to decrease it to 1 or even lower?
In my initial run I didn't specify a PSTRESS (so I believe the default is 0 --> running it from 200K to 1000K) and I can see that the pressure increases which is good as I want it to be liquid and supercritical the water phase (not gas). However, I am just concerned that I want the pressure at 600K to 900K to be around 600 bars and instead it is around 12kbars.
Many thanks for the reply! Instead of using the ICONST I am instead in the INCAR using the tag: LATTICE_CONSTRAINTS = F F T
Would you recommend to use ICONST instead? I also have my POTIM to be 2 (but have my hydrogens weighing more). Would you recommend me to decrease it to 1 or even lower?
In my initial run I didn't specify a PSTRESS (so I believe the default is 0 --> running it from 200K to 1000K) and I can see that the pressure increases which is good as I want it to be liquid and supercritical the water phase (not gas). However, I am just concerned that I want the pressure at 600K to 900K to be around 600 bars and instead it is around 12kbars.
-
- Global Moderator
- Posts: 314
- Joined: Mon Sep 13, 2021 12:45 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
If you have an orthorhombic system LATTICE_CONSTRAINTS is fine. Otherwise, I would suggest constraining the cell shape via ICONST.Instead of using the ICONST I am instead in the INCAR using the tag: LATTICE_CONSTRAINTS = F F T
Would you recommend to use ICONST instead?
Yes, I would recommend decreasing POTIM.I also have my POTIM to be 2 (but have my hydrogens weighing more). Would you recommend me to decrease it to 1 or even lower?
Could you provide the files for this calculation (see forum guidelines)?In my initial run I didn't specify a PSTRESS (so I believe the default is 0 --> running it from 200K to 1000K) and I can see that the pressure increases which is good as I want it to be liquid and supercritical the water phase (not gas). However, I am just concerned that I want the pressure at 600K to 900K to be around 600 bars and instead it is around 12kbars.
-
- Newbie
- Posts: 23
- Joined: Tue Jun 11, 2024 11:01 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Thanks Alexey! Just letting you know I have seen your forum message and I will upload the files later. The jobs have a couple of more hours on them so I thought just wait for them to finish and then I will upload them
I have made an ICONST now as I believe my cell is monoclinic and not orthorhombic. I have just added the plain surface POSCAR and the INCAR just so you can see my use of LATTICE CONSTRAINTS and see if that would work for the system.
I will upload the others probably in the evening my time (so around 12 hours).
Many thanks,
Jess
I have made an ICONST now as I believe my cell is monoclinic and not orthorhombic. I have just added the plain surface POSCAR and the INCAR just so you can see my use of LATTICE CONSTRAINTS and see if that would work for the system.
I will upload the others probably in the evening my time (so around 12 hours).
Many thanks,
Jess
You do not have the required permissions to view the files attached to this post.
-
- Newbie
- Posts: 23
- Joined: Tue Jun 11, 2024 11:01 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Just to clarify the one I have uploaded now don't have the liquid. The ones with the pressure do - just wanted to add this to see if LATTICE CONSTRAINTS can be used for this system without the liquid
-
- Newbie
- Posts: 23
- Joined: Tue Jun 11, 2024 11:01 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Hi,
Here are my files. I have also created the totalpressure.dat to compare.
I have three files:
1) no constraints but has a pressure
2) constraints using lattice constraint in INCAR and has pressure
3) constraints with ICONST and has pressure
Here are my files. I have also created the totalpressure.dat to compare.
I have three files:
1) no constraints but has a pressure
2) constraints using lattice constraint in INCAR and has pressure
3) constraints with ICONST and has pressure
You do not have the required permissions to view the files attached to this post.
-
- Newbie
- Posts: 23
- Joined: Tue Jun 11, 2024 11:01 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Hi,
this fourth file has lattice constraints but I had not set PSTRESS. It has been running for a while which is why the temp is higher than the previous three
this fourth file has lattice constraints but I had not set PSTRESS. It has been running for a while which is why the temp is higher than the previous three
You do not have the required permissions to view the files attached to this post.
-
- Global Moderator
- Posts: 314
- Joined: Mon Sep 13, 2021 12:45 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Thank you for providing the files.
Regarding the files you sent. I see that you are changing the temperature from 300 to 900K during the simulation. As you change the temperature, the thermostat and barostat take some time to equilibrate the system and that is going to lead to variation in temperature and pressure. So if you would like to evaluate the pressure in your system, you should run a simulation at constant temperature and pressure in a proper NPT ensemble.
Indeed, the cell is monoclinic, so you should use ICONST.I have made an ICONST now as I believe my cell is monoclinic and not orthorhombic.
Regarding the files you sent. I see that you are changing the temperature from 300 to 900K during the simulation. As you change the temperature, the thermostat and barostat take some time to equilibrate the system and that is going to lead to variation in temperature and pressure. So if you would like to evaluate the pressure in your system, you should run a simulation at constant temperature and pressure in a proper NPT ensemble.
-
- Newbie
- Posts: 23
- Joined: Tue Jun 11, 2024 11:01 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Thank you! Also do I need to then re-run the plain surface with no liquid with ICONST or is it ok as the ICONST is only important with the addition of liquid?
I also assume that the ICONST in the tutorial is ok for my system?
I also assume that the ICONST in the tutorial is ok for my system?
-
- Global Moderator
- Posts: 314
- Joined: Mon Sep 13, 2021 12:45 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Correct. I don't think you need to worry about ICONST if you only include the solid.Also do I need to then re-run the plain surface with no liquid with ICONST or is it ok as the ICONST is only important with the addition of liquid?
Yes, you can find an example of ICONST file for an orthorhombic cell in the wiki. Keep in mind that you have a monoclinic cell, so you should adjust the file to correctly account for the relative proportions of lattice vectors a1:a2:a3I also assume that the ICONST in the tutorial is ok for my system?
-
- Newbie
- Posts: 23
- Joined: Tue Jun 11, 2024 11:01 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Thanks Alexey, really appreciate all the help and patience you are giving me! So I am struggling a bit with making the ICONST for a monoclinic cell - more in fact the S coordinates.
So I found the proportion of lattice vectors is 1: 0.79 : 2 instead of 1:1.5:2 of the orthorhombic cell in the wiki.
Orthorhombic in wiki:
S 1 0 0 0 0 0 0
S 0 1 0 0 0 0 0
S 0 0 1 0 0 0 0
S 0 0 0 1.5 -1.0 0.0 0
S 0 0 0 2.0 0.0 -1.0 0
S 0 0 0 0.0 4.0 -3.0 0
Maybe monoclinic if use same structure with different lattice proportion:
S 1 0 0 0 0 0 0
S 0 1 0 0 0 0 0
S 0 0 1 0 0 0 0
S 0 0 0 0.79 -1.0 0.0 0
S 0 0 0 2.0 0.0 -1.0 0
S 0 0 0 0.0 4.0 -1.58 0
Am I completely off the mark here? this is the lattice proportions for the supercell or do I need to do it for the simple bulk? Sorry for all these questions, I am now confusing myself a bit I just want to make sure I understand and get it. I am just comparing with the cubic and orthorhombic cell in the wiki and seeing the S are the main change.
So I found the proportion of lattice vectors is 1: 0.79 : 2 instead of 1:1.5:2 of the orthorhombic cell in the wiki.
Orthorhombic in wiki:
S 1 0 0 0 0 0 0
S 0 1 0 0 0 0 0
S 0 0 1 0 0 0 0
S 0 0 0 1.5 -1.0 0.0 0
S 0 0 0 2.0 0.0 -1.0 0
S 0 0 0 0.0 4.0 -3.0 0
Maybe monoclinic if use same structure with different lattice proportion:
S 1 0 0 0 0 0 0
S 0 1 0 0 0 0 0
S 0 0 1 0 0 0 0
S 0 0 0 0.79 -1.0 0.0 0
S 0 0 0 2.0 0.0 -1.0 0
S 0 0 0 0.0 4.0 -1.58 0
Am I completely off the mark here? this is the lattice proportions for the supercell or do I need to do it for the simple bulk? Sorry for all these questions, I am now confusing myself a bit I just want to make sure I understand and get it. I am just comparing with the cubic and orthorhombic cell in the wiki and seeing the S are the main change.
Last edited by jess_white on Thu Jul 11, 2024 3:55 am, edited 1 time in total.
-
- Global Moderator
- Posts: 314
- Joined: Mon Sep 13, 2021 12:45 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
No worries, ICONST file is not really straightforward to set up.
I assume that the first six lines of your ICONST are:
Then your ICONST should be correct.
I assume that the first six lines of your ICONST are:
Code: Select all
LA 1 2 0
LA 1 3 0
LA 2 3 0
LR 1 0
LR 2 0
LR 3 0
-
- Newbie
- Posts: 23
- Joined: Tue Jun 11, 2024 11:01 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
Thanks so much Alexey! That is correct that I had the first lines like that. Appreciate all the help and hopefully the MLFF will go well
-
- Newbie
- Posts: 23
- Joined: Tue Jun 11, 2024 11:01 pm
Re: MLFF NPT Pressure Question (solid/liquid interface)
So I am just having a think and makes sense to use the ICONST for the liquid but because its liquid and solid - wouldn't the solid be able to constrain the system? This is also for machine learning forcefield so does the ICONST not matter as much? Once again my apologies for all the questions