I need to use lammps as a library for a parametrization project.
I am good at F90 but don’t know c.
I want to call lammps as an external function for a single small run and get energies
or positions of atoms. I checked examples/coupling section but there was only a C example and a single command to get positions of atoms. Is there any documentation about these commands?
Postdoctoral R. Associate
TAMU Chemical Engineering Dept.
examples/couple has both a C and C++ example that
do the same thing. The routines in src/library.cpp
are a simple library interface to LAMMPS. From C++
you just instantiate LAMMPS and make those calls.
If you include the LAMMPS namespace in your program,
then you can call anything you want from it. Adding routines
to library.cpp is the preferred way to do it.