[lammps-users] simple torsion

Hi,

I need to implement a bond that resists twisting. I want to keep it very simple, so I won’t be modeling the actual structure that is causing the resistance. I want to use point particles (lj point interaction + fene bonds) and add the code for the torsion.

I have a mathematical model that is using a kind of dipole moment (only the direction, not the length).

So my question is: Is there any problems in creating a new bond type that can be used only on dipoles (or a subclass of them) and that reacts with a torque on those dipoles? I can create the code but I’m not sure if it’s not against some coding guidelines in lammps.

Regards
Stefan Krastanov

Hi,

I need to implement a bond that resists twisting. I want to keep it
very simple, so I won't be modeling the actual structure that is
causing the resistance. I want to use point particles (lj point
interaction + fene bonds) and add the code for the torsion.

I have a mathematical model that is using a kind of dipole moment
(only the direction, not the length).

So my question is: Is there any problems in creating a new bond type
that can be used only on dipoles (or a subclass of them) and that
reacts with a torque on those dipoles? I can create the code but I'm
not sure if it's not against some coding guidelines in lammps.

lammps is open source and GPL, so you can do whatever you want.
coding guidelines only matter, if you want others to use your
code as well and would like to have it integrated into the
main distribution. but even for that there are differences between
"standard" code and "user" packages, that are maintained externally.

however, i am wondering whether one of the existing dihedral
or improper dihedral classes can already do what you want,
or whether it would be more logical to implement your model
through this mechanism. you are very vague about what you
want to do, so it is hard to give specific advice.

cheers,
    axel.

Hi,

Thanks for the fast response.

Here is the system I want to model: A semi-rigid polymer that also resist torsion, so if I apply torque to one atom/monomer he wont be able to rotate freely and the torque will “propagate” to the other atoms. I want a harmonic potential (as function of the angle).

For the sake of the discussion I will suppose that the chain is on a straight line. In that case I was thinking about using a dipole(later I may implement another class that does not overlap with dipole) to be able to calculate the angle between monomer. Let us assume that I can calculate it.

I prefer this over using dihedrals as it is simpler(one monomer = one particle). Am I missing something (from technical point of view, or may be a dihedral that I have missed)?

And yes, the code will be used by others, so it needs to follow some guidelines (preferably those of lammps).

Regards
Stefan Krastanov

Hi,
Thanks for the fast response.
Here is the system I want to model: A semi-rigid polymer that also resist
torsion, so if I apply torque to one atom/monomer he wont be able to rotate
freely and the torque will "propagate" to the other atoms. I want a harmonic
potential (as function of the angle).
For the sake of the discussion I will suppose that the chain is on a
straight line. In that case I was thinking about using a dipole(later I may
implement another class that does not overlap with dipole) to be able to
calculate the angle between monomer. Let us assume that I can calculate it.
I prefer this over using dihedrals as it is simpler(one monomer = one
particle). Am I missing something (from technical point of view, or may be a
dihedral that I have missed)?

you say you want to represent the polymer chain by lj particles
and that they may be in a straight line, then you have a problem:
there is no way to determine torsion around a bond, since lj-particles
are point particles. you would have to use either aspherical particles,
or point dipoles or extended (granular) particles to tell the relative
particle orientation apart.

starting from your suggestion to use dipoles, you would then indeed
be able to orient your particles according to the relative dipole orientation
in a modified variant of the FENE code (as that was your preferred bonded
potential). that of course would require that also these dipoles would be
meaningful elsewhere, particularly in the propagator.

And yes, the code will be used by others, so it needs to follow some
guidelines (preferably those of lammps).

the first and simplest guideline is to identify the class that is most similar
to what you plan to do, and then rename and modify it to comply with
your needs. the second would be to program a very conservative style
of c++ (no rtti, no exceptions, no STL or BOOST, c-style i/o not iostreams,
multiple inheritance and templates only if there is a significant benefit).
at least this is what i am trying to follow.

cheers,
    axel.