From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Fri Jan 15 2010 - 09:10:27 CST

On Fri, Jan 15, 2010 at 7:05 AM, MyLinkka <mylinkka_at_gmail.com> wrote:
> Hi Alex,

dear ting,

you obviously have not thought about this enough.

> I'm confused. Why you think improper should be that different
> from bond, angle and dihedral? It's just a out-of-plane
> dihedral involving 4 connected atoms, isn't it?

an improper is _very_ different from a regular angle or a dihedral
angle. the latter are derived from the bond topology, the former is
not. and since it is not derived from the topology of bonds, you
cannot guess it from the bond topology.

_mathematically_ it could be implemented with the same subroutine
that would be used for dihedral angles, but that is not the issue here.

> see Figure 2.at
> http://www.ks.uiuc.edu/Training/Tutorials/science/topology/topology-html/node4.html
> and
> figure here: http://hidra.iqfr.csic.es/man/dlpoly/USRMAN/node50.html
> and there clearly show the difference between dihedral and improper, I
> think.
>
> and more, the msi2lmp tool shipped with lammps also can produce improper
> list
> in the output lammps data file. I don't mean to compare them with topotools.
> Just hope to make myself clear.

yes, again, you do not seem to have fully understood what it is that
the guessXXXX routines in topotools do. they do _guess_. msi2lmp
is a _converter_. it takes the topology, coordinate and forcefield information
from one set of files and converts them to lammps format. that is very
different from guessing the topology from only coordinate and/or bonding
information (guessbonds uses covalent radii and distance heuristics to guess
bonds, guessangles and guessdihedrals take bonding information and generate
angle and dihedral definitions from it). this is also different from tools
like psfgen that have to have residue/fragment template data to assign
bonds (and assign/derive angles and dihehedral). tools like psfgen can
assign impropers, because the improper definition is stored in their
database. the motivation to write the guessXXXX functions in topotools
is to help building topologies for systems where this information does
not readily exists or would be difficult to generate, e.g. nanotubes or -sheets.

> When I write here, I realize maybe there is some misunderstanding.
> I didn't mean judge everything from ONLY the atom coordinates!
> I know that's automatically done in VMD if the input file has only atom
> positions but no bonding information there. What I want to say is
> ONCE we have known the bonding info., we can derive angles, dihedrals
> and impropers only based on the topology information. We don't have to
> guess any more. Of course, not all the force fields has all parameters for
> all impropers, or we can think the energy constant is zero.

this is not how it works. see my explanations above. impropers _are_
a special case and can only inferred from having additional external
information, and that is effectively assigning them explicitly.

> Or if you say, bond, angle, dihedral or improper can include non-bonded
> atoms, then distance based guess may be necessary. But this is not usual.

please keep in mind that topology data, which is generated by the guessXXXX
methods, may not be complete. this is a design decision. those subroutines
are not intended to be correct all the time, but to work where other methods
may fail.

cheers,
   axel.

> Ting
>
>
> Axel Kohlmeyer wrote:
>>
>> On Wed, 2010-01-13 at 17:41 +0100, MyLinkka wrote:
>>>
>>> Hi Axel,
>>>
>>>
>>> I can understand to guess impropers just based on
>>> atom coordinates is ridiculous. But once the bonds,
>>> angles and dihedrals are already provided explicitly
>>> or guessed, I think the impropers should also be defined,
>>>
>>
>> no, why?
>>
>>
>>>
>>> right? In this case no guess is needed.We can always
>>> define an improper with 4 atoms, i,j,k,l, with i the center
>>> and j,k,l connecting to i.In principle if the atoms
>>> positions and bonds are provided, we can write out all the
>>> internal coords. (bond/angle/dihedarl/improper). I don't
>>>
>>
>> with this logic in mind, please explain what would be the difference
>> between an improper and a dihedral.
>>
>>
>>>
>>> really understand why you say improper must be give
>>> explicitly? Could you please explain it further?
>>>
>>
>> have a look at what impropers are used for!
>>
>> you need to know more about the system and the force field to place
>> impropers. there is no way to guess them from topology alone. to
>> a lesser degree this is true for bonds, angles,
>> and dihedrals. this is why i called those subcommands
>> _guess_something to indicate some vagueness and
>> need to recheck.
>>
>> cheers,
>>   axel.
>>
>>
>>>
>>> Ting
>>>
>>>
>>> Axel Kohlmeyer wrote:
>>>
>>>>
>>>> On Wed, 2010-01-13 at 15:28 +0100, MyLinkka wrote:
>>>>>
>>>>> Hello, Axel,
>>>>>
>>>>
>>>> hello ting,
>>>>
>>>>
>>>>>
>>>>> Will there be a guessimpropers function in this plugin?
>>>>>
>>>>
>>>> no. never.
>>>>
>>>>
>>>>>
>>>>> I didn't find it in v1.1 and neither in the todo list in README
>>>>>
>>>>
>>>> please think about it for a little bit, and then
>>>> you should realize that impropers always have to be given explicitly, or
>>>> would at least need very
>>>> special heuristics for specific cases.
>>>>
>>>>
>>>>>
>>>>> Thanks for making this useful tool!
>>>>>
>>>>
>>>> you're most welcome. it has been fun writing it.
>>>> i only wish i had more time for working on it. :-(
>>>> there is still so much that could be done.
>>>>
>>>> cheers,
>>>>   axel.
>>>>
>>>>
>>>>>
>>>>> Ting
>>>>>
>>>>
>>>>
>>
>>
>

-- 
Dr. Axel Kohlmeyer    akohlmey_at_gmail.com
Institute for Computational Molecular Science
College of Science and Technology
Temple University, Philadelphia PA, USA.