[lammps-users] simple torsion

stefan,

please always keep the list in cc. thanks!

So I am left with two (hopefully final) questions:
- I did not understand the remark "these dipoles would be meaningful
elsewhere, particularly in the propagator".

a particle with an orientation only makes sense when you propagate
its orientation. of course, you need a suitable hamiltonian for that, or
else your twist resisting bond would be meaningless.

I have read LAMMPS Molecular Dynamics Simulator and was just going to
rewrite some bond*.cpp files. Am I terribly mistaken :slight_smile: Where else should I
change the code (I'm not expecting you to devote much of your time, but I
will be grateful if you point me to some documentation)?

if you want to model dipolar particles, you should look at the code in the
DIPOLE directory.

- What should I do so the program does not segfault when someone tries to
use that new bond on particles that are not dipoles (or
that hypothetical, better suited subclass)? Is it already taken care of?

your bond type class can check for atom properties being available.
have a look at the AtomVecDipole constructor. it sets:

  molecular = 0;
  mass_type = 1;
  shape_type = 1;
  dipole_type = 1;

cheers,
    axel.

Axel,

Thank you for all the help.

I started writing the code, but I can not find any documentation about ev_tally*. Is there any documentation about it besides the code itself?

And a second question. I am going to add some code to bond_fene that comes from reading pair_dipole_cut. I have calculated all the energies, forces and torques that my system is going to have (according go my model) and I am using dipoles (hybrid angle dipole). Is there anything else that I have to do besides not screwing up ev_tally*. I’m sorry about repeating the question, but I don’t understand the meaning of “propagator” (English is a second language for me and I have not found the word in a technical dictionary).

And lastly. I’m still a student and this is my first assignment in MD. As I am modeling something fairly simple and lammps is quite powerful, it seems to me that I should not need to write supplemental code. Is there any obvious mistake in my method (modeling torsion resisting monomers in this manner)? I am asking for an opinion here, as this is the first MD code I am studying.

Best regards
Stefan

I just read thru this thread, and I'm confused about what
you are trying to do. What does it mean for a bond to
"twist" if not a torsional motion of the 4 atoms in a
dihedral (with the bond at the center of the diherdral).
In which case, Axel's earlier suggestion is correct. That
is what the dihedral functions in LAMMPS already do,
e.g. dihedral_style harmonic. Why can't you just
define a dihedral centered on every bond you want
to apply the twist constraint to?

Steve

Hi,

It would be simpler to explain the phenomenon I want to model:

A semi rigid polymer to which I apply torque (on both ends in opposite directions). It’s expected that under such condition the polymer will curl up and form coils.

I was planing on using a string formed from monomers with only one particle (of type hybrid angle dipole) per monomer and implementing some potential that calculates the angle between monomers using the direction of the dipole.

It seems to me that this is not the right way. But as this is my first assignment in MD I fail to see how I can use the dihedrals.

My questions are: Is there a better way to do it using only one particle per monomer (a model that permits applying torque to the ends of the polymer)?

Regards
Stefan

Hi all,

It seems I have started all this the wrong way. I’m very sorry for the confusing descriptions in my previous letters.

So it all boils down to one question. Is there a simple way to model the following type of polymer using only one particle per monomer? The polymer is: a semi rigid polymer to which I apply torque (on both ends in opposite directions). It’s expected that under such condition the polymer will curl up and form coils.

Thank you for all your help.

Regards
Stefan

Hi all,
It seems I have started all this the wrong way. I'm very sorry for the
confusing descriptions in my previous letters.

hi stefan,

figuring out how to describe a problem well, so that others
properly understand what you want to do, is usually the first
(and most important) step to solve it.

So it all boils down to one question. Is there a simple way to model the
following type of polymer using only one particle per monomer? The polymer
is: a semi rigid polymer to which I apply torque (on both ends
in opposite directions). It's expected that under such condition the polymer
will curl up and form coils.

in principle this would be possible, but there are some caveats.
as was writing before, in conventional classical MD simulations,
atoms are treated as points and thus have no moments of inertia
and you cannot apply torque to them.

lammps however, does support extended particles, e.g.,
through the granular package. those particles are different
in that they do have moments of inertia and also friction on
the surface. whether they would be good models for your
polymer is a tricky question. i have little experience in this.
one problem would be to integrate the equations of motion.

the alternative would be to do a less "extreme" coarse graining
by representing each monomer by a few particles that approximate
the shape of it. this would allow you to forego all the complications
and stick with simple atom-like models. this is what our group does.

http://www.temple.edu/cst/icms/surfactants.html#cgmodel

with that kind of model, you would just use dihedrals (or impropers)
to model the property that you are after.

cheers,
     axel.

Axel,

stefan,

Thank you for all the help.

I started writing the code, but I can not find any documentation about
ev_tally*. Is there any documentation about it besides the code
itself?

only comments in the code. the purpose of the ev_tally*() family
of methods is to "tally" (=accumulate/collect) global or per atom
properties like the potential energy or the virial into the
proper arrays (or not, depending on different flags).

And a second question. I am going to add some code to bond_fene that
comes from reading pair_dipole_cut. I have calculated all the
energies, forces and torques that my system is going to have
(according go my model) and I am using dipoles (hybrid angle dipole).
Is there anything else that I have to do besides not screwing up
ev_tally*. I'm sorry about repeating the question, but I don't
understand the meaning of "propagator" (English is a second language
for me and I have not found the word in a technical dictionary).

http://en.wiktionary.org/wiki/propagate

in this context propagator is the algorithm that moves "stuff" forward,
e.g. the velocity verlet. the issue is that you can easily come up with
a model and energies/forces, but unless your particles have moments of
inertia and you use a propagator that can rotate them around their
center of mass, there is very little use to it.

And lastly. I'm still a student and this is my first assignment in MD.
As I am modeling something fairly simple and lammps is quite powerful,

while you think of it as simple, the solution you propose is
fairly non-standard and not that commonly used. as a beginner,
it would be much easier to first understand the basics of MD
with a much simpler systems. the classic example would be
liquid argon with lj particles. this is a very well studied
system and you would first learn how to control all kinds of
simulation parameters to reproduce well known results, before
you apply that experience to your research project. if you
start with the research right away, one problem will continuously
be: is what you see correct? and if not, is it wrong because of
errors in the programming, or errors in the way how the simulation
is run.

it seems to me that I should not need to write supplemental code. Is
there any obvious mistake in my method (modeling torsion resisting
monomers in this manner)? I am asking for an opinion here, as this is
the first MD code I am studying.

i repeat myself, but in my opinion you have not yet fully understood
the implications of the difference between point particles and
extended particles and difficulties resulting from propagating the
latter. even though you often visualize atoms as spheres looking like
billiard balls, they are not acting like that in their physics.

cheers,
    axel.

Axel,

I’m grateful for the time you took to help and for your thorough answer. I believe I’m on the right track now.

Stefan

Dear Stefan,

You should also look in the literature for the various approaches used
to model polymers, as there is a large community working on this
subject and the solution to your problem is possibly already existing
somewhere.

I'm not an expert in this field but one simple way to model a polymer
resisting to torsion would be to use one of the available descriptions
of alkanes (hydrocarbon chains), for instance the old but still widely
used OPLS model:

William L. Jorgensen, Jeffry D. Madura, and Carol J. Swenson, J. Am.
Chem. Soc. 1984, 106, 6638.

Best,
Laurent

Thank you very much, Laurent. I’ll look into those.

Stefan