how to use _coeff command

First of all, sorry for my English—I used AI to help with the translation.

I’m new to LAMMPS and still learning how to write scripts and run simulations. Right now, I’m studying how to build a bilayer using Span 60 molecules (Sorbitan Monostearate, PubChem link). I used Open Babel to generate a .lmpdat file, which I then included in my script.

The .lmpdat file provides the number of angles, bonds, and dihedrals, which makes sense so far. However, I’m confused about what values to assign in the bond_coeff, dihedral_coeff, and angle_coeff commands. I understand how to define different types (e.g., bond types like bond_coeff 1 X Y, bond_coeff 2 X Y), but my question is: How do I determine the correct X and Y values, knowing they should be different for each?

I also realize I need to apply a force field to my system. Honestly, I still have a lot of doubts—like I said, I’m just starting out, and I might be jumping ahead without grasping the basics. I’d really appreciate any help!

If you have tips on how to approach my idea—whether through different programs or alternative LAMMPS scripts—I’d love to hear them.

The first thing you should do (before even thinking about your project) is learn about MD and force fields in general and then you need to work through tutorials to learn the “craft” of doing MD with LAMMPS. Only after have mastered the tutorials and learned and understood(!) the theory and principles, can you approach your research project. You should also obtain a tutor that can give you competent feedback while “looking over your shoulder”. Usually, that would be your adviser or a collaborator of your adviser. You cannot get that kind of help from an online forum where people volunteer their time.

This article has an overview of force fields which was written for non-experts that may serve as a starting point. https://doi.org/10.1021/acs.jpcb.3c08419, preprint is at: Type Label Framework for Bonded Force Fields in LAMMPS | Theoretical and Computational Chemistry | ChemRxiv | Cambridge Open Engage

And here is a revised set of tutorials aimed at beginners in the field and with LAMMPS

1 Like

Thank you for your answer. appreciated.