Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About OPLSAA example of hexadecane #98

Open
chaosicong opened this issue Mar 17, 2024 · 3 comments
Open

About OPLSAA example of hexadecane #98

chaosicong opened this issue Mar 17, 2024 · 3 comments

Comments

@chaosicong
Copy link

I ran the file on the OPLSAA force field for n-hexadecane.However, there are a few questions that I am not quite sure about. Firstly, regarding the creation speed, the annotation is 300K, but the actual creation speed is 900K.Secondly, why is there a sudden temperature drop and then a rapid increase to equilibrium in the command "fix fxlan all langevin 900.0 900.0 120 48279 fix fxnve all nve"output,Like in the picture.Finally, I really don't quite understand your comment on NPT balance, # At the very end of the previous simulation, the temperature dropped below#The boiling point Run the simulation for longer at these conditions to#Give it a chance for the vapor ->liquid transition to complete#We will also slowly decrease the pressure to 1 bar. Why is there a gas-liquid phase transition? Although high temperatures (900K)were initially used, the output pressure at high temperatures(900) was particularly high, and n-hexadecane is a liquid. Isn't this high pressure going to convert into a gas first
屏幕截图 2024-03-17 203847

@hothello
Copy link
Contributor

hothello commented Mar 26, 2024

The annotation most likely comes from a previous example. The actual velocity command is the one executed and it sets the temperature to 900 K.
To understand the behaviour of the energy at the beginning of the simulation, it is useful to visualise the trajectory.

The initial guess of the system is created with the Moltemplate command:

molecules = new Hexadecane [12].move(0, 0, 5.2)
                           [12].move(0, 5.2, 0)
                           [2].move(31.2, 0, 0)

which creates an orthogonal grid where the molecules are placed. The drop in temperature you observe in the first 50 steps is due to the kinetic energy being redistributed to the other degrees of freedom, thus decreasing the temperature. After that, the thermostat pumps energy into the system to reach the target temperature, thus also increasing the kinetic energy.

Why is there a gas-liquid phase transition?

The initial structure of the sample is created at low density to avoid bad contacts, but the molecules are oriented on a lattice by construction. The strategy of the simulation is to disrupt this order by annealing at high temperature and fixed volume, followed by an NPT step where the sample is exposed to high pressure and cooled to ensure a liquid phase is formed. In the last step, the pressure is decreased to 1 atm, at which point the sample should remain liquid.

I appreciate that this example is a bit convoluted. I will prepare a tidied-up version of the same simulation which will be delivered in the next update. I hope this answers your questions.

@jewettaij
Copy link
Owner

jewettaij commented Apr 1, 2024

I could not have answered this better myself. Thank you Otello!

Yes. Unless you use packmol (or some other geometry generation program), the initial geometry created by moltemplate using a lattice is extremely unrealistic for a liquid, and likely to put the system a kinetic trap (local minimum). So this example uses high temperatures to completely obliterate any memory of that initial lattice shape. Then it uses a combination of high pressures and cooling to bring the system back down to a temperature and density of a liquid at 1atm, 300K. There are many moltemplate examples which use this strategy. (I did the same thing for the packmol examples, even though I probably didn't need to.)

Thanks for the feedback.I see what you mean about this comment:

# Give each atom a random initial velocity consistent with a system at 300K.

My apologies! That was a typo. It should have been 900K.
I will take a look at the README files for these examples to see where else they can be improved. (But it might be a week or two.)

@chaosicong
Copy link
Author

Thank you @jewettaij.Your explanation made it clear to me that it would be great if the in file description provided in moltemplate could be a little clearer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants