Graphite at STP

Hello, I have the script below that creates graphite. I am trying to simulate graphite at STP. When I set the temperature to 293K, my pressure is -13000 bars or so. When I try to set the pressure to 1 bar, then my temperature gets extremely small. Does anyone see a way in which I can simulate this graphite model at STP? The values do not make sense to me and I am thinking I must be missing something. Should I use a fix that allows the volume to fluctuate or change the amount of moles? Since PV=nRT needs to be satisfied, it makes sense that P and T are effecting each other. I just cannot seem to figure out how to model this correctly and was hoping some of the lammps users or experts could help me out. Thanks!

This is a solid-state graphite, so the ideal gas relation is irrelevant. It seems you don’t have a barostat. How is pressure controlled?

Ray

That is what I am trying to figure out. I tried setting the pressure using fix nvt iso command but it didn’t seem to change anything. I can either set my temperature or set my pressure but it won’t let me set both. Any ideas on how to set both of these? Currently I am getting a negative pressure meaning the box is applying a pressure to the graphite.

That is what I am trying to figure out. I tried setting the pressure using
fix nvt iso command but it didn't seem to change anything. I can either set

there is no "iso" option to fix nvt. it only applies to fix npt and nph.

my temperature or set my pressure but it won't let me set both. Any ideas on
how to set both of these? Currently I am getting a negative pressure meaning
the box is applying a pressure to the graphite.

you have to use fix npt.

...and you should *definitely* (re-)read the many discussions on
thermostats and barostats and pressure fluctuations of dense systems
and so on in the mailing list archives. looking into a stat. mech.
text book on these issues won't hurt either.

axel.

My apologies. I did use npt and the results did not make any sense either. I used:

fix 1 all npt temp 300 300 1 iso 1 1 1000

However, my pressure and temp did not change to these values when I ran the simulation.

Ben

Trial and error on your input will not work. Follow Axel advice from bottom to top and stop computing and start reading.

Carlos

I understand that trial and error will not work. I am just trying to figure out why fixing my temp and pressure using npt does not work. I thought perhaps the airebo potential was in different units, but it is indeed set for metal units so that cannot be it. I have spent quite a bit of time reading the lammps temp/barostat commands and from what I can tell, I have implemented the commands as I should. My system is not responding to them and I am assuming my input must have an error somewhere and was asking the lammps list to see if anyone saw my error that I cannot seem to find.

Thank you for your time,

Ben

I understand that trial and error will not work. I am just trying to figure
out why fixing my temp and pressure using npt does not work. I thought
perhaps the airebo potential was in different units, but it is indeed set
for metal units so that cannot be it. I have spent quite a bit of time
reading the lammps temp/barostat commands and from what I can tell, I have

please note, the LAMMPS documentation only tells you the "mechanics"
of the LAMMPS application, it does not teach you how to set up a
correct MD. same as the manual of a car doesn't teach you how to
drive. it just tells you what switches there are and what they stand
for.

axel.

Duly noted. I Appreciate everyone’s advice and will continue reading to hopefully figure out my problem. If anyone does see an error with my input script below, as to why the temp and pressure are not being taken into account, I would very much appreciate the help. Using the fix npt command, I tried setting the temp and pressure but I cannot figure out why it is not working.

Thank you everyone,

Ben

Statistically speaking chances are that your implementation is not correct. Did you try performing an initial minimization on your lattice via fix box/relax+minimize? The abnormally large pressure you initially reported must be the result of your lattice not corresponding to a minimum of the potential, i.e. you took the config from a paper that used a different FF or approach to smulate the material.

Carlos

what about the timestep and the relaxation times? I mean, your timestep is 0.0001, and you run for 10000 steps, yet your relaxation times for the thermo and barostat are enormous. try reducing them to ~100/1000 timesteps (as the manual says, by the way: http://lammps.sandia.gov/doc/fix_nh.html in a part that practically shouts out loud “IMPORTANT NOTE!”).

you shouldn’t take the answers towards you over-aggressively, just consider that, as you, many of people here ran into this sort of issues, and know when a simple manual re-reading can be enough.

greetings,

pablo

I did obtain an average pressure of zero (or 1 bar) by using the following steps

  1. minimize with box/relax
  2. replicate the system to a significantly larger size
  3. use fix npt with more appropriate thermostat/barostat damping factors.

Please do realize that temperature/pressure fluctuates even with NPT dynamics. Amplitude of fluctuation can be reduced by using a larger system.

Ray

you shouldn't take the answers towards you over-aggressively, just
consider that, as you, many of people here ran into this sort of issues,
and know when a simple manual re-reading can be enough.

Exactly. Nothing here is personal. But many users do not do their homework
before coming to this forum and thus end up wasting the valuable time of
many other people.
Stops signs are always red, bright and clear, never pink or faded, so that
it can be seen from far away. The same applies to the advice that is
offered here. It's not just for you but for all the future answer-seekers
who will be browsing this forum.
Carlos

Ok I understand. The advice you all have given has helped a lot. I have managed to define my pressure and temp accurately (my damping was way off as said).

I am now seeing that my volume is exploding. However, I think this should be able to be fixed using the box/relax command correct?

Ben

Ok I understand. The advice you all have given has helped a lot. I have
managed to define my pressure and temp accurately (my damping was way off as
said).
I am now seeing that my volume is exploding. However, I think this should be
able to be fixed using the box/relax command correct?

you thank for advice, but don't follow it. RTFM *please* and make
choices based on reason, not guesses.

thank you,
     axel.

Hello,

I have re-read a lot of this material and it has indeed solved many of my problems. I am still not seeing the results that I am looking for. I first use minimization to get my pressure in a somewhat decent range.

I also re-read some of the old forum threads on this but have not had any luck in actually getting my pressure to settle at approximately 1atm. I tried a timestep of 0.001 and use pdamp of .1 (100 timesteps) and tdamp of 1 (1000 timesteps). My temperature seems to level out fairly nicely but my pressure doesn’t want to stay near 1 atm. I still fluctuates some and once my temp gets up to 300K it fluctuates into the the thousands of bars.

I have:

timestep 0.001
fix 1 all box/relax iso 1

minimize 1e-15 1e-15 500 1000

min_modify line quadratic

fix 2 all npt iso 1 1 .1 temp 300 300 .01

Ben

Hello,

I have re-read a lot of this material and it has indeed solved many of my
problems. I am still not seeing the results that I am looking for. I first
use minimization to get my pressure in a somewhat decent range.
I also re-read some of the old forum threads on this but have not had any
luck in actually getting my pressure to settle at approximately 1atm. I
tried a timestep of 0.001 and use pdamp of .1 (100 timesteps) and tdamp of 1
(1000 timesteps). My temperature seems to level out fairly nicely but my
pressure doesn't want to stay near 1 atm. I still fluctuates some and once
my temp gets up to 300K it fluctuates into the the thousands of bars.

so what? how compressible is your system? have you looked into finite
size effect?

don't you have an adviser that you can talk to occasionally??

axel

> Hello,
>
> I have re-read a lot of this material and it has indeed solved many of my
> problems. I am still not seeing the results that I am looking for. I
first
> use minimization to get my pressure in a somewhat decent range.
> I also re-read some of the old forum threads on this but have not had any
> luck in actually getting my pressure to settle at approximately 1atm. I
> tried a timestep of 0.001 and use pdamp of .1 (100 timesteps) and tdamp
of 1
> (1000 timesteps). My temperature seems to level out fairly nicely but my
> pressure doesn't want to stay near 1 atm. I still fluctuates some and
once
> my temp gets up to 300K it fluctuates into the the thousands of bars.

so what? how compressible is your system? have you looked into finite
size effect?

don't you have an adviser that you can talk to occasionally??

axel

>
> I have:
>
> timestep 0.001
> fix 1 all box/relax iso 1
> minimize 1e-15 1e-15 500 1000
> min_modify line quadratic

Why using min_modify command?? I mean have you tried minimizing without
using this??
Have you increased your system size and checked..??

> fix 2 all npt iso 1 1 .1 temp 300 300 .01

For how many timesteps did u run??

Sagar

Yeah, I realized the min_modify command was not something I needed here.

I increased my system size to 21,952 atoms which did make a big difference.
The temperature is settling down around 300K and the pressure is fluctuating just a little bit (around -4 to +4 atm)

I do notice that the more I increase the system size, the less it fluctuates as you guys have said.

Now it’s just a matter of computational power. I am running it now for 10,000 timesteps for the system to settle, then dumping images starting at 10,001 timestep and will stop it when I feel I have enough data.

When you guys say “increase system size,” what order of magnitude are you generally suggesting? Once I start using more computational power, then I plan on significantly increasing the system size to see the results.

Ben

Yeah, I realized the min_modify command was not something I needed here.
I increased my system size to 21,952 atoms which did make a big
difference.
The temperature is settling down around 300K and the pressure is
fluctuating just a little bit (around -4 to +4 atm)
I do notice that the more I increase the system size, the less it
fluctuates as you guys have said.
Now it's just a matter of computational power. I am running it now for
10,000 timesteps for the system to settle, then dumping images starting at
10,001 timestep and will stop it when I feel I have enough data.

When you guys say "increase system size," what order of magnitude are you
generally suggesting?

The same order of magnitude when you see your results making "not much"
difference with increase in system size. So, that you have to figure out
yourself.

Sagar