Combine customized metal-molecule force field in lammps?

Dear all,

I developed a metal-molecule interaction force field with Python. However, I could not found a good way to combine it into lammps to run molecular dynamics.

Any suggestion about tools? Can moltemplate do the job? Or is there any good tutorial about this?

Thank you!
Zhi

Dear all,

I developed a metal-molecule interaction force field with Python. However, I could not found a good way to combine it into lammps to run molecular dynamics.

You have to provide more information. What is “a good way”?

Any suggestion about tools? Can moltemplate do the job? Or is there any good tutorial about this?

What kind of tools to do what? Moltemplate is a tool to build topologies, not for adapting python code to lammps.

There are plenty of tutorials and lots and lots of documentation. You will have to study both and figure out what applies to your specific case.

Axel

Hi Alex,

I read the moltemplate manual and also lammps. The potentials in lammps source code are written with fortran while moltemplate is useful but I may need more examples about customized force-fields.

Do you have similar experience? What is the simplest way to implement it as your point of view? I want to try the simplest method first to get a sense of it.

Thank you!
Zhi

Hi Alex,

I read the moltemplate manual and also lammps. The potentials in lammps
source code are written with fortran while moltemplate is useful but I may
need more examples about customized force-fields.

your explanations don't make sense. how can you claim to have read the
documentation, when you make such gross misrepresentations?

LAMMPS and moltemplate are two *very* different entities that serve
very different purposes.
besides, LAMMPS is written in C++, not fortran (there are a couple of
cases, where there is a wrapper that interfaces to fortran, but that
is the exception, not the rule) and i don't see why you need more
"examples" (and what kind?). most potentials in LAMMPS *are*
customized. it is not clear at all from your extremely vague
description, what you understand under "customized force fields" means
and thus what kind of examples you are looking for.
the LAMMPS documentation is flooded with examples, LAMMPS comes
bundled with lots of examples, there are plenty of tutorials on the
web, many of the presentations of past LAMMPS workshops are archived.
i find it *very* hard to believe that there is nothing useful at all
in there, unless i have to make some very uncomplementing assumptions
about your level of understanding and skill. worst case, you can
always read the source code...

Do you have similar experience? What is the simplest way to implement it as
your point of view? I want to try the simplest method first to get a sense
of it.

you have still not explained what exactly what "it", i.e. your
problem, is. nobody can make suggestions solve it, when you cannot
describe your problem.

axel.

Hi Alex,

For example, my force-field have a long rang potential, electrostatic potential and a fittiing potential. The long range and electrostatic one are well defined with exact functions, which don’t have fitting parameters. The fitting potential is ambigorous with lots of fitting parameters for different atom types like Carbon, Hydrogen, Oxygen, Gold, Silver …

I have the python code. My plan is first make every atom type and its characters as a class object. Then use the main function to calculate the force field value. The question is - How I can put the classes and main function into lammps? What is the simplest way? Is there an example talking about this?

Thank you!
Zhi

Hi Alex,

For example, my force-field have a long rang potential, electrostatic
potential and a fittiing potential. The long range and electrostatic one are
well defined with exact functions, which don't have fitting parameters. The
fitting potential is ambigorous with lots of fitting parameters for
different atom types like Carbon, Hydrogen, Oxygen, Gold, Silver ...

pretty much *every* potential type in MD has fitting parameters. take
lenndard-jones, for example.
so you can look at how all of those are implemented.

I have the python code. My plan is first make every atom type and its
characters as a class object. Then use the main function to calculate the

that doesn't make sense. each class of potential should be a single class.

force field value. The question is - How I can put the classes and main
function into lammps? What is the simplest way? Is there an example talking
about this?

again, please read the documentation properly. there is a whole
section explaining how to extend the LAMMPS code.
it is *extremely* frustrating to have to explain things that are well
documented and rather have to deal with vague statements and
misrepresentations.

you *will* not find a custom made example that just gives you a
step-by-step solution for exactly your specific problem.

axel.