How to compute the net force and torque per particle in a granular system?

Hello everyone, I’d like to compute the net force and torque per particle in a granular system. Which command should I use? I have read the manual and found some similar commands like compute erotate/sphere command, but they all can not directly compute the force and torque.
By the way, when I know what I want to realize, How can I search the corresponding command?
Thanks!

That would be the documentation :slight_smile: https://docs.lammps.org

For what you want to do, I would look either at compute_property_atom or dump custom, they both allow you to extract force values on each atom.

Best,
Simon

Thanks! However, I know I should read the documentation and my question is How can a beginner search the corresponding command instead of browse the whole command.

What I do is I type keywords of what I want to achieve in google, and usually the appropriate command appears within the first results.

Thank you for your suggestion!

You have to manage your expectations and approach better. You cannot expect that a search will give you with pinpoint accuracy only the information you are looking for. In most cases you must “read round” since you not only need to know the exact command, but also need to learn some context.

So far a lot of your problems have originated exactly from your lack of context knowledge. As a beginner you will have to spend the extra time. Even though you may feel right now that you are wasting your time by reading through text that does not contribute to solving your immediate problems, it is crucial to accumulate knowledge about context and to learn about best practices and how features in LAMMPS generally work and how they are explained. This is all extremely valuable and will help to guide you with future problems and will help you on the way to become a “LAMMPS simulation expert”. In fact, “reading around” is a general good advice for any kind of research. You will never know when one additional piece of information that you have picked up “on the side” will be useful. People that look only at what is required for their immediate problem are doomed to become what is sometimes called an “expert beginner”, i.e. a person that has become an expert at solving problems like a beginner, but not like a proper expert.

When googling around you can find a bunch of essays about “expert beginners” (mostly in the context of software development, but writing simulation input files is not that far from it) and how this can become a big problem (and not only for the person themselves).

Thank you for your sincere and frank suggestion. I will pay attention to the guidance you gave.
Thanks again!