I want to calculate the thermal conductivity of the ice-water interface. After writing the data file, I want to use the npt ensemble to reduce the structural gaps and make the energy distribution more reasonable.
However, during the npt process, the ice structure in the structure completely collapses.
I want to know which part causes the collapse of the structure.
here is my input script
units real
atom_style full
dimension 3
boundary p p p
pair_style hybrid lj/cut/coul/long 12.0 12.0
pair_modify mix geometric tail yes
kspace_style pppm 1e-5
kspace_modify order 4
neigh_modify every 10 delay 0 check yes
bond_style harmonic
angle_style harmonic
read_data iw_q.data
pair_coeff 2 2 lj/cut/coul/long 0.000000 0.000000 # H
pair_coeff 1 1 lj/cut/coul/long 0.102055 3.188000 # O
pair_coeff 4 4 lj/cut/coul/long 0.000000 0.000000 # H
pair_coeff 3 3 lj/cut/coul/long 0.102055 3.188000 # O
bond_coeff 1 450.0 0.9572
angle_coeff 1 55 104.52
neighbor 3.0 bin
timestep 0.001
min_style cg
minimize 1.0e-18 1.0e-18 800 2000
reset_timestep 0
dump 6 all xyz 5000 ice_water-2.xyz
dump_modify 6 sort id
dump 7 all custom 5000 ice_water-2.v id type x y z
dump_modify 7 sort id
group water id 1:3072
group ice id 3073:5816
velocity water create 300 1234566
velocity ice create 150 1234566
fix 1a all shake 0.0001 10 0 b 1 a 1
fix 1 all npt temp 150 150 0.1 z 0 0 1000
thermo 500
run 2000
write_data ice_water-1.data
I know that the structural part of ice does not have a bond-angle relationship. Because I used a different method to build the structure of ice than water molecules, I used the unit cell structure of ice to model it, and this modeling method does not contain the relationship between bonds and angles. I saw on YouTube that Eric Hahn used the same modeling method but stabilized the structure of the ice under the npt ensemble, but I don’t know the exact parameter settings.
So what else is there to build the structure of ice with bond-angle relations? Can you give me some reference. (If you set it all to water molecules and turn some of the water into ice by cooling it, would this be too complicated and error-prone?) )
As @akohlmey pointed out, there are no bonds defined for the water molecules in the ice phase. You need to create a DATA file with the correct molecular topology, and for that you can also use two atom types.
You can still keep the groups defining water and ice for e.g. visualising the two phases changing into one.
My question is that I have no idea about creating a data of ice structure with bond and angle information. I take ice as a kind of crystalloid. The file of a crystalloid like cif,pdb seems not including angle and bond information.
So how to creat a data of ice with bond and angles,can you give me any ideas?
How much prior experience do you have with molecular dynamics? Have you read any prior papers that try to simulate ice with molecular dynamics and have you tried first to replicate those papers?
I am an undergraduate student who has just started learning lammps. My teacher gave me this problem of calculating the thermal conductivity of the ice-water interface and asked me to solve it. Actually, I don’t really understand the scientific research process yet.
Thank you for your reply.
This is a very hard problem you have been asked to do, especially at an undergraduate level. In particular, most three- and four-point water models do not model ice well. Most of them show freezing points of -30°C – here is a recent paper that discusses this: https://pubs.acs.org/doi/10.1021/acsomega.0c02638
Now, it is very likely that the ion models I mentioned earlier will show similar performance in OPC3 water in LAMMPS as with SPC/E water in GROMACS. But it would be nice if someone explicitly showed it. That someone can be you:
Generate simulations for the ions in SPC/E water in LAMMPS to match the GROMACS simulations and confirm that you get similar results.
Replace the SPC/E water with OPC3 water and see whether it makes a difference or not.
This would be a reasonable undergraduate project: setting up simulations of a homogeneous phase under barostatting and thermostatting and choosing variables (continuous ones being the sale concentration, and discontinuous ones such as the choice of force field and software) against which differences can be quantified and rationalised.
By the way, this is how I like to do science: find a meaningful problem (whether different softwares return similar results, which they should, and whether different water models behave similarly, which they should but there will certainly be small differences), and where either a “positive” or a “negative” result would be interesting and would have some explanation that fits in with the wider literature.
This is a nicely crafted project with clear goals and path to execution.
The problem that @Ave currently has is to convert a crystal structure file into a LAMMPS data file that contain topological information. This task can be done in a number of different ways (and with different software, including homebrew scripts) and teaching it remotely is certainly beyond the scope of this forum. @Ave, you have to refer to your supervisor for technical supervision.
Thank you very much for your reply. I feel that I have gained a lot, not only in terms of knowledge, but also in terms of scientific research. I will carefully consider the content and feasibility of the new direction you proposed, but I have not given up on the current project yet. I am still looking for a solution and I hope I can solve it.
Thank you very much for your serious reply again.
Thanks for your reply.
I am trying to learn how to convert a crystal structure file into a LAMMPS data file that contain topological information now. thanks for your advice.
Hello, sorry to bother you again. I am just starting to research and hope to realize the project you suggested to me. However, I am a physics student, and this article involves a lot of chemistry, so I don’t have a lot of definitions and calculation principles clear to me, such as solvation free energy, activity coefficients. Do you have any recommended books or papers that can help me get started with these contents relatively quickly?
Hi @Ave, unfortunately thermodynamics and thermochemistry are the fundamentals of many aspects of molecular simulation. There is no real shortcut apart from sitting down and learning some if you have to. Any classical textbook should give you the basics. A good place to start is your university/school library or online resources.
Your research mentor appears to not be supporting you very much.
Luckily for you I am in a chatty mood – I will still ask @akohlmey to close the thread after this though, because this forum really is meant to help people use LAMMPS, not to generally conduct research.
Having said that, here are the general stages of an MD project with minimal pain:
Organisation: deciding where and how you will keep records (parameters tried, results obtained); working out how many CPUs you can typically run on at once, and what your total CPU-hours budget is.
Planning your work: what simulations do you want to do and what do you want to measure?
System setup: building your initial simulation boxes with their molecules, ions, etc.
Scaling tests: determining what number of CPUs gives a good tradeoff, as using too few CPUs at once means running your jobs slowly, but using too many leads to lost efficiency. Once you know your system’s scaling, you can accurately estimate the nanoseconds per CPU-hour you can simulate, allowing you to plan in detail the number of simulations you will be able to run.
Prototyping: running your first few simulations, paying attention to whether you can analyse the trajectories properly with those settings.
Production: running all of your planned simulations.
Analysis: analysing the obtained simulations and determining the results.
Now, you do not need to know too much theory to do number 2, since I’ve already given you a plan of work in the previous post (run SPC/E + ions simulations in LAMMPS; perform some basic analyses – density vs molality and RDFs would be basic, and diffusivities and activity coefficients would be the next step up). I will also recommend this paper to you: https://pubs.acs.org/doi/10.1021/acs.jpcb.2c08047 their initial setups and scripts are publicly available online, making it even easier to start simulations.
Beyond that: one last useful tip I can give you is, do not read a scientific paper from start to finish. A scientific paper has the following rough structure:
Why We Did An Awesome Thing
How We Did An Awesome Thing
What We Saw Doing An Awesome Thing
If you are stuck on part 1, then that part wasn’t written for you. It was mostly written for other scientists who understand why That Thing Is Awesome. As a practical example, you probably don’t understand why it’s a big deal that these people have released their force field. But once you have actually done a salt water simulation – and once you appreciate how the density of such a solution depends on a critical fine balance between the electrostatic and non-electrostatic interactions – THEN the “Why We Did This” section will make sense.
Instead, focus on the steps they took and understand how those steps work. Understand what molecular dynamics “settings” they used, and see if you can translate those into a LAMMPS script. Run some simulations and see if you can make sense of your results.
You will learn much more quickly if, instead of generic questions that don’t really have an answer, you are asking very specific questions of the format: “when I do X, I expect A to happen, because of theory P. But instead I see B happening. What should I try doing instead of X?”. Mistakes are how we learn.
Thank you very much for providing me with so much help and advice. The questions I asked are obviously beyond the scope of this forum.
It may be that I spent too much time on trival information before, lacked experience in reading papers, and did not find an effective way to start a project. Now I have an idea and am ready to start.
It is a pity that this topic will be closed. I think there are still many people like me who are just starting to engage in scientific research and are still confused about how to start a project or how to read papers. Most of the supervisors often assign tasks instead of teaching us how to complete the tasks.
I am very lucky to have someone like you who is willing to share and impart your experience. If one day I become a skilled worker in MD simulation, I will definitely actively provide help to some beginners.
We already had some discussion of the same kind, for example here, and the topic was brought up some times even on the mailing list that is now archived in the forum. Do not hesitate to use the search function of the forum but please do not necropost such topics.
Yet such a forum is not the place to learn statistical mechanics and molecular modelling in depth. This should be supervisors role and I am a bit disappointed to read this. Hopefully there are some people willing to teach the craft decently out there.
While I empathize with this predicament, the solution cannot be that others have to step in and be a substitute. Instead, you should take the initiative and demand to be taught properly. After all, it is a job of a supervisor at a university to teach people and not to boss them around and let others fill in. That may mean that you need to complain to the department head or simply walk away and find a more helpful supervisor. If there are other students with the same experience, form a group and do this together, that increases the impact significantly.
The threat of walking away is a big power that students have over their supervisors, since without the students no work gets done and a supervisor that has no publications is in trouble.
To be clear – “closing” the topic just means we won’t take any new replies, since the discussion has come to a natural conclusion point for now (i.e. you have a clear plan of action, and you should be able to progress until you possibly hit some specific problems with running LAMMPS).
It’s just good “netiquette” or forum practice to close threads when they’re finished. So rare to have a neat, tidy conclusion in anything in life! It is certainly not a sign of hard feelings from anyone’s side (certainly not mine) – you’ve done your best given the circumstances and hopefully you’ve learned something about science and about the (sometimes strange) ways internet forums work.
The posts will still be available online, and you are welcome to start new threads as you need to – whether it is LAMMPS-usage-specific questions on this board, or the more general “Science Talk” forum.