Non-numeric pressure - simulation unstable

Hello all
I have made a random solid alloy in my LAMMPS script using a pre-existing potential file and need to equilibriate the system using an NPT ensemble, but I keep getting the error: “Non-numeric pressure -simulation unstable” all the time, each time with a different error code. My structure and the relaxation process are as follows:

units metal
boundary p p p
atom_style atomic

lattice fcc 4.64

region 5 block 0 32.49 0 32.49 0 32.49
create_box 5 5
create_atoms 1 box
create_atoms 2 box
create_atoms 3 box
create_atoms 4 box
create_atoms 5 box

set region 5 type/ratio 1 0.40 12345
set region 5 type/ratio 2 0.30 67890
set region 5 type/ratio 3 0.20 24680
set region 5 type/ratio 4 0.05 13579
set region 5 type/ratio 5 0.05 45678

pair_style eam/alloy
pair_coeff * * FeNiCrCoCu-heafixed.setfl Fe Ni Cr Co Cu

reset_timestep 0
timestep 0.001
fix 5 all npt temp 300.0 300.0 0.5 iso 0.0 0.0 10.0 drag 1.0

thermo_style custom time step temp ke pe press etotal
thermo 100

run 10000

Also, when I try to minimize the energy, it runs the first step and shows NaN for pressure and energies and won’t continue anymore.

thanks for your help in advance,
Ali

Where did you get this piece of input from?
You are creating 5 types of atoms directly on top of each other… No wonder your simulation crashes.

This piece of code is also not likely doing what you expect. There have been repeated discussions of how to build systems with different ratios of atom types. The problem here is that the ratio is applied to all atoms, so that the number of atoms of types you set first will be lower than initially set.

Thx dear Axel,

I changed my script and used atom_modify together with region and set 5 types and it worked. It made an FCC lattice but I’m not sure how reliable it is.

This makes no sense at all. The only atom_modify option that uses regions is the “first” option and that has absolutely nothing to do with your bad choices for commands in your input.

It will create whatever lattice or geometry that you tell LAMMPS to create.

Well, that is essentially your job and part of any any simulation study. For example, have you checked what percentages of the individual atom types you have now? Does it match your expectations?

Thanks for the answer, sir;

The atoms occupy FCC positions which is the idea. I didn’t define any groups, instead I set types and then relaxed the system. The atomic fraction though roughly matches my needs and is not accurate. Using the first keyword changes atomic fraction which makes the simulation more unreliable.

You are still not making much sense and since you are not providing sufficient detail, there is no way to provide any assistance. If you want help, you have to make it easy to help you. Instead you do the opposite. You have now exhausted my patience and I will not pay any attention anymore.

So sorry I got it all wrong, Good sir;
Here is my new input script, please take a look:

units metal
boundary p p p
atom_style atomic

lattice fcc 4

region 5 block 0 100 0 100 0 100 units box
create_box 5 5
create_atoms 1 box

set type 1 type/fraction 1 0.35 12345
set type 1 type/fraction 2 0.35 24680
set type 1 type/fraction 3 0.20 34567
set type 1 type/fraction 4 0.05 45678
set type 1 type/fraction 5 0.05 56789

reset_timestep 0
timestep 0.0001
fix 5 all npt temp 300.0 300.0 0.5 iso 0.0 0.0 10 drag 1.0

thermo_style custom time step temp ke pe press etotal
thermo 100

run 10000

write_data NiCoCrFe_changed.lmp

group type1 type 1
group type2 type 2
group type3 type 3
group type4 type 4
group type5 type 5

variable n1 equal count(type1)
variable n2 equal count(type2)
variable n3 equal count(type3)
variable n4 equal count(type4)
variable n5 equal count(type5)

print “type1 count = {n1}" print "type2 count = {n2}”
print “type3 count = {n3}" print "type4 count = {n4}”
print “type5 count = ${n5}”

So as can be seen, I first made my random system and then relaxed it and got the atoms in their right FCC positions in OVITO. The atomic fractions though, specially the first 3 type counts, are not quite right:

type1 count = 29498
type2 count = 21670
type3 count = 8155
type4 count = 1609
type5 count = 1568

I also tried the “atom_modify first 1” command followed by defining Group instead of type in “set” command as for:

group 1 region 5
set group 1 type/fraction 1 0.35 12345
set group 1 type/fraction 2 0.35 24680
set group 1 type/fraction 3 0.20 34567
set group 1 type/fraction 4 0.05 45678
set group 1 type/fraction 5 0.05 56789

and all I got was different atomic fractions witch were way different from my expectations, as type1 count and type2 count should return almost same amounts:

type1 count = 29498
type2 count = 15678
type3 count = 11263
type4 count = 2959
type5 count = 3102

I was also wondering if I should check the results using RDF.
Again, I’m really sorry for the misconception!

I really need your help and I would provide you with all the details I can think of. Please Doctor. I know my answers were vague and I’m sorry for that. I really need to get this right and I don’t have much support and appropriate tutor here. So I would make horrible mistakes I know. Would you please tell me what I’m missing here? Is there another command I should use?

I would really appreciate if you help me enter this fascinating world of simulations. I hope I get an answer from you. :pray:

Please sir, tell me what I’m missing? Anything else I should mention here? Not learning this project can really affect my future in an improper way.

@Raptor please remember that:

  • This MatSci forum is not a substitute for a research advisor or mentor
  • Everyone here are volunteers
  • If you exhaust someone’s patience, they may not respond anymore and you need to accept that gracefully
  • Please don’t post many times if there is no reply in between, but rather “edit” your existing posts if you have new info
  • Please format your input code blocks with triple ticks ``` so we can read them
  • If your original problem is solved but you have another issue, please create a new thread
  • No one is going to debug your simulations for you–that is your job

I once heard an analogy that I’ve adapted to LAMMPS:

“Just because someone gives you an X-ray machine doesn’t make you a radiologist.” LAMMPS is like an X-ray machine, you need a proper mentor and training (not provided by this forum) and it could take years to get proficient at using this very complex, powerful tool.

1 Like

Thanks fir your advise, dear stamoor. I will surely consider these tips. Sorry if I do wrong. I’m new here and I may not know the terms.

@Raptor it sounds like your original issue of “Non-numeric pressure - simulation unstable” has been solved, but now you have another question about the composition of the simulation? If so, please post a new thread. Thank you.

Dear stamoor,
Thanks for your answer and care. The result of my simulation looks satisfying for the time being. Of course there are still problems regarding getting the best result, but that’s an issue for later work after I defended my Ph.D. proposal. I would definitely ask my questions if I came up to and found no answer.
Much thanks,
Ali