Ben Roberts wrote:
> becomes
>
> <snip>
> 34623 34647 -34620 -34611 43 20088 20094 20091
> -0 44
> 21228 21237 21234 -0 44 15294 15303 15300
> -3 44
> 15402 15411 15408 -3 44
> %FLAG EXCLUDED_ATOMS_LIST
> <snip>
>
> Which is all well and good, but when I ran "rdparm dihedrals" on this
> file, it marked the new dihedrals - which is fine - but only the second
> two showed up as impropers (i.e., with an I before them).
>
> Output from rdparm:
>
> <snip>
> 45137: 1.000 3.14 2.0 :448.CG :448.CE1 :448.ND1 :1.NI
> (6697,6699,6698,1)
> 45138: 1.000 3.14 2.0 :474.CE1 :474.CD2 :474.NE2 :1.NI
> (7077,7080,7079,1)
> I 45139: 1.000 3.14 2.0 :336.CE1 :336.CD2 :336.NE2 :2.NI
> (5099,5102,5101,2)
> I 45140: 1.000 3.14 2.0 :338.CE1 :338.CD2 :338.NE2 :2.NI
> (5135,5138,5137,2)
> <snip>
>
> Now I know that to specify an improper, one makes the fourth number
> negative - as you can see I've done. But it looks to me as though,
> because that fourth number is zero in this case, it's interpreted it as
> a non-negative number!
>
>
> Is there any way around this?
>
> Cheers,
> Ben
>
Hi Ben,
I recently hit a similar issue when coding the the CHAMBER CHARMM to
AMBER converter. In short, my solution was to reverse the atom index
order in the dihedral:
20088 20094 20091 -0 44
would become
-0 20091 20094 20088 44
I think this same approach may work for you; test it and see if it works
as expected.
Here's the cvs log for my CHAMBER check-in; it should give some background:
revision 10.49
date: 2009/05/26 20:18:02; author: mjw; state: Exp; lines: +31 -6
MJW:
Fix a situation when the k value of a prmtop is zero and negative
==================================================================
Within the sections:
DIHEDRALS_INC_HYDROGEN
DIHEDRALS_WITHOUT_HYDROGEN
in a prmtop file, dihedrals are listed for a system being described.
Each dihedral is described using five numbers, the first four relate to
the indexes of the atoms in the dihedral and the fifth is a "pointer"
into the DIHEDRAL_FORCE_CONSTANT, DIHEDRAL_PERIODICITY and
DIHEDRAL_PHASE lists giving the associated parameters for that specific
dihedral.
The first four numbers are not (as one would expect) the atom index
(given by the order in ATOM_NAME) of each atom in the dihedral, but
instead the atom index number minus one, multiplied by three.
For example, the dihedral listed in a prmtop as follows:
%FLAG DIHEDRALS_WITHOUT_HYDROGEN
%FORMAT(10i8)
0 12 18 24 2
would correspond to torsion 1-5-7-9 and point to number two in the
associated DIHEDRAL_* parameter lists.
AMBER denotes an IMPROPER torsion in its dihedral indexes by prefixing
the 4th atom (l) with a negative sign. It does the same with the 3rd
atom (k) to indicate that the end group interactions (i.e. any 1-4
interactions) of this torsion should be ignored.
A problem arises when k is atom one (1) in the system and it needs to be
flagged to ignore its 1-4 contribution, e.g.
Given a dihedral of atom index: 4-3-1-7
it becomes the prmtop'ed form of: 9 6 0 18
Here in lies the problem, you cannot put a sign on a zero:
9 6 -0 18
IEEE 754 does not yield a solution here since there is debate about
the formatted printing of negative zeros.
Hence the solution is to *reverse* the dihedral, hence in this example,
the dihedral written to the prmtop will be:
18 0 -6 9
Thanks to Dave Case, Gustavo, Wei and Ross for discussions on this.
----------------------------
I hope this helps,
Mark
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Jul 06 2009 - 09:55:34 PDT