Hi everyone
I am working on a problem containg few acid molecules at air water interface. I want to apply position restraint for acid during NVT/NPT equilibrium phase.
So, I prepared the interface and placed the acid on its surface manually. To apply the position restraint i created the posre.itp file by using genresre command. when i am using grompp to equilibrate this system i am getting error as follows:
Fatal error:
Syntax error - File restr.itp, line 3
Last line read:
‘[ position_restraints ]’
Invalid order for directive position_restraints
It seems that there is some problem in my itp file or in topology. I don’t know how to solve it.
--------------------------------------------------------.top file--------------------------------------------------------------------- #include “oplsaa.ff/forcefield.itp”
#ifdef POSRES #include “restr.itp” #endif
#include “oplsaa.ff/tip3p.itp”
[ system ]
; Name
HNO3 in water
[ molecules ]
; Compound #mols
SOL 499
HNO3 1
---------------------------------------------------------------posre.itp-------------------------------------------------------------
; position restraints for non-Water of 216H2O,WATJP01,SPC216,SPC-MODEL,300K,BOX(M)=1.86206NM,WFVG,MAR. 1984
[ position_restraints ]
; i funct fcx fcy fcz
1498 1 1000 1000 1000
1499 1 1000 1000 1000
1500 1 1000 1000 1000
1501 1 1000 1000 1000
1502 1 1000 1000 1000
~
This problem has bothered me for one week. Any suggestion would be of great help to me. Thanks a lot!
Hi nano,
Thank for the message. As you pointed out, I added the directive to acid itp file but i am getting the error
“ERROR 1 [file topo_h.top, line 28]:
Atom index (1) in position_restraints out of bounds (1-0). This probably means that you have inserted topology section “position_restraints” in a part belonging to a different molecule than you intended to.”
i want to restraint the acid molecule. Here is my topology file
#include “oplsaa.ff/forcefield.itp”
[ moleculetype ]
; name nrexcl
HNO3 3
This [moleculetype] definition is syntactically incorrect. It appears to be somewhat of a hybrid of .rtp and actual topology entry. Atoms need to be numbered, and all bonds, angles, etc. need to be specified by numbers, not atom names. You’re getting a fatal error because there are essentially zero atoms correctly defined, so you cannot apply restraints.