Hi Ross,
I already found the reason. It happens in src/leap/src/leap/parmSet.c,
around line 517:
iNew = iParmSetTorsionGenerality( tmPCur->tpTorsion.sType1,
tmPCur->tpTorsion.sType2,
tmPCur->tpTorsion.sType3,
tmPCur->tpTorsion.sType4 );
iOld = iParmSetTorsionGenerality( tpPTorsion->sType1,
tpPTorsion->sType2,
tpPTorsion->sType3,
tpPTorsion->sType4 );
should swap iNew and iOld. Obviously The author made a mistake here.
I have put the right one to CVS repository. I think it will solve
your problem.
Sincerely
Wei Zhang
On Thu, 2005-10-13 at 10:28 -0700, Ross Walker wrote:
> Hi Everyone.
>
> Has anybody managed to get improper torsions working as specified in an
> frcmod file?
>
> E.g. If I have NMA
> O
> |
> CT-N-C-CT
> |
> H
>
> There are two impropers I want to change:
>
> CT-N-C-O & C-CT-N-H
>
> These are defined in the parm99.dat file as:
>
> X -X -C -O 10.5 180. 2.
> C -CT-N -O 1.1 180. 2.
>
> Now, if I modify these directly in the parm99.dat file all is good.
However,
> I want to use the frcmod approach to modifying these.
>
> So I specify the following frcmod file:
>
> angles fitted
> MASS
>
> BOND
> N-H 521.8079 1.0104
> C-O 739.4008 1.2387
> C-N 322.4874 1.3697
> CT-C 227.9333 1.5105
> N-CT 310.5384 1.4427
>
> ANGL
> C-N-H 39.4603 110.8903
> H-N-CT 43.7170 109.3932
> O-C-N 80.0535 121.7368
> C-N-CT 71.0434 113.4190
> CT-C-O 54.0136 123.3811
> CT-C-N 58.8671 113.8363
>
> DIHE
> O-C-N-H 1 -15.3311 0.0 1.0
> O-C-N-H 1 9.4589 180.0 2.0
> CT-C-N-H 1 -0.0292 180.0 2.0
> O-C-N-CT 1 3.6089 180.0 2.0
> CT-C-N-CT 1 3.4041 180.0 2.0
>
> IMPROPER
> C -CT-N -H 0.2123 180. 2.
> CT-N -C -O 14.5029 180. 2.
>
> NONB
>
> I then load tleap as follows:
> /usr/local/amber9/exe/tleap
>
> >source leaprc.ff03
> >loadamberparams frcmod
> >nma = loadpdb nma.pdb
> >saveamberparm nma nma.prmtop nma.inpcrd
>
> This creates the attached prmtop file. Now if I then look at this with
> rdparm I find that the bonds angles and regular dihedrals have been
handled
> correctly and the explicit specified ones in the frcmod file have
overidden
> the ones in parm99.dat. However, the improper torsion parameters I
specified
> in the frcmod file have been ignored and the ones from the parm99.dat
file
> are used:
>
> Dihedral pk phase pn atoms
> 1: -15.331 0.00 1.0 :1.O :1.C :2.N :2.H
(6,5,7,8)
> E 2: 9.459 3.14 2.0 :1.O :1.C :2.N :2.H
(6,5,7,8)
> ...
> B 22: 1.100 3.14 2.0 :1.C :2.CH3 :2.N :2.H
(5,9,7,8)
> ...
> B 25: 10.500 3.14 2.0 :1.CH3 :2.N :1.C :1.O
(2,7,5,6)
>
> So, it appears that while supposedly supported, specifying impropers in
the
> frcmod file does not work. At least not to overide an existing parm.dat
> parameter. This is very worrying since several of the frcmod files
provided
> in $AMBERHOME/dat/leap/parm/ use this mechanism. E.g. frcmod.constph,
> frcmod.ff03ua and frcmod.urea. Did the authors of these files ever
> explicitly check that leap was doing what they though it was doing? And
if
> so how do you get it to work?
>
> Note, this is not an issue with leap not reading the frcmod file
correctly
> but something much deeper in the internals. E.g. If you run xleap and
load
> the frcmod file into a parmset unit you can then edit that unit and see
the
> impropers were read in. They are just not used when writing the prmtop
file.
>
> xleap
> >source leaprc.ff03
> >frcmod = loadamberparams frcmod
> >edit frcmod
>
> Click on impropers and lo and behold they are there. They just don't
replace
> anything from the parm99.dat file.
>
> So, does anybody have a fix for this? Or know enough of the Leap source
code
> to work out what is going on? I know I could modify the parm99.dat file
to
> get around this problem but this is not what we encourage users to do
and is
> not really the best practice...
>
> Comments?
>
> All the best
> Ross
>
> /\
> \/
> |\oss Walker
>
> | Department of Molecular Biology TPC15 |
> | The Scripps Research Institute |
> | Tel: +1 858 784 8889 | EMail:- ross.rosswalker.co.uk |
> | http://www.rosswalker.co.uk | PGP Key available on request |
>
> Note: Electronic Mail is not secure, has no guarantee of delivery, may
not
> be read every day, and should not be used for urgent or sensitive
issues.
--
Wei Zhang <zweig.scripps.edu>
The Scripps Research Institute
Received on Wed Apr 05 2006 - 23:49:52 PDT