I am trying to restrain the distance between two atoms in a molecule, with just 102 atoms. To be more specific, I want to restrain a MG (number 22) from Chlorophyll with a carbon atom (number 14) from Histidine, to make sure, that their bond stays at the same distance in an optimization. Can some provide an example, of how I can define the restraint in [molecule type]? My topology file ist contained in the following: acpype_newbondCLAHIS.top (74.9 KB)
I am restraining atoms of my ligand and protein as:
[ distance_restraints ]
; ai aj type index type’ low up1 up2 fac
1610 4651 1 0 1 0.25 0.25 0.25 10.0
4648 578 1 0 1 0.25 0.25 0.25 10.0
1623 578 1 0 1 0.25 0.25 0.25 10.0
and i get error as: Atom index (1610) in distance_restraints out of bounds (1-11). This probably means that you have inserted topology section
“distance_restraints” in a part belonging to a different molecule than you intended to. In that case move the “distance_restraints” section to the right molecule.
can someone help me with this.
the protein and ligand are two distinct entities in the topology file;
i also prepared posre file using genrestr (–disre) and supplied the posre.itp files to the topol.top files; yet i got the same error.
Any help is appreciated.
The distance restraints, that you are using, are for restraints within one molecule and the atom numbers are the internal atom numbers in that molecule.
See the answers above in this thread and read the links.
Thanks Magnus for your reply.
I am trying to restrain atoms of ligands and atoms of protein;
ligand atoms (4650, 4646) and protein atoms (1610, 1624, 579).
I am trying to align my ligand along a reaction coordinate, and so I want to keep 1610-4650 at 0.25 nm (currently at 0.32 nm), 1624-4646 at 0.33 nm (currently at 0.45nm) and 579-4646 at 0.33 nm (currently at 0.65nm); i achieved the atom numbers from the gro file; is it correct? I do not understand the meaning of “internal atom numbers in that molecule”.
Just make sure that you are using [ intermolecular_interactions ] not [ distance_restraints ] (as told in the links above) and I think you should be fine.
;
; File ‘topol.top’ was generated
; By user: anwesh (540)
; On host: habilis
; At date: Tue Jan 7 11:42:43 2025
;
; This is a standalone topology file
;
; Created by:
; :-) GROMACS - gmx pdb2gmx, 2019.4 (-:
;
; Executable: /home/compchem/gromacs-2019.4/bin/gmx
; Data prefix: /home/compchem/gromacs-2019.4
; Working dir: /home/anwesh/hld_project/md_lig_crys
; Command line:
; gmx pdb2gmx -f protein.pdb -o protein.gro -ignh
; Force field was read from the standard GROMACS share directory.
;
; Include forcefield parameters #include “amber03.ff/forcefield.itp”
; Include ligand parameters #include “TCP.prm”
[ moleculetype ]
; Name nrexcl
Protein_chain_A 3
[ atoms ]
[ bonds ]
[ pairs ]
[ angles ]
[ dihedrals ]
[ dihedrals ]
; Include Position restraint file #ifdef POSRES #include “posre.itp” #endif
; Include ligand topology #include “TCP.itp”
; Ligand position restraints #ifdef POSRES_LIG #include “posre_TCP.itp” #endif
; Include water topology #include “amber03.ff/tip3p.itp”
#ifdef POSRES_WATER
; Position restraint for each water oxygen
[ position_restraints ]
; i funct fcx fcy fcz
1 1 1000 1000 1000 #endif
; Include topology for ions #include “amber03.ff/ions.itp”
[ system ]
; Name
Protein in water
[ molecules ]
; Compound #mols
Protein_chain_A 1
TCP 1
SOL 15304
NA 17
; restraints for distances
[ intermolecular_interactions ]
;[ distance_restraints ]
; ai aj type index type’ low up1 up2 fac
1610 4650 1 1 1 0.25 0.25 0.25 500
1624 4646 1 1 1 0.33 0.33 0.33 500
579 4646 1 1 1 0.33 0.33 0.33 500
Dear Magnus, this is how my topol.top file looks like, and i get following error:
Software inconsistency error:
unknown directive
I don’t see why you get an “unknown directive” error. Hopefully that is fixed in more recent versions of GROMACS. But you’ll also have to modify the parameters. The intermolecular_interactions should follow the format of bonds of the specified type, in your case func. type 1. See File formats - GROMACS 2024.4 documentation for more details.
I realise that intermolecular_interactions can probably use all kinds of bonded interactions etc (not just bonds), perhaps even distance_restraints. You can probably do:
; restraints for distances
[ intermolecular_interactions ]
[ distance_restraints ]
; ai aj type index type’ low up1 up2 fac
1610 4650 1 1 1 0.25 0.25 0.25 500
1624 4646 1 1 1 0.33 0.33 0.33 500
579 4646 1 1 1 0.33 0.33 0.33 500
the fc is as per choice; while the distances are set so as the atoms come this close while dynamics; i tried as per your suggestions, and got followiing error:
Program: gmx grompp, version 2019.4
Source file: src/gromacs/gmxpreprocess/convparm.cpp (line 593)
Fatal error:
The intermolecular_interaction can not contain chemically bonding interactions
; restraints for distances
[ intermolecular_interactions ]
[ bonds ]
; ai aj type b0 kb
1610 4650 6 0.25 500
1624 4646 6 0.33 500
579 4646 6 0.33 500
as type 1 generates exclusions, which cannot be used in intermolecular_interactions.
But regarding the simultaneous distance restraints, as far as I understand, that is only required if they contribute to the same NOE signal, and I presume at least one atom would have to be the same in that case. Do you use NOE at all, or are your restraints just to keep the atoms at the correct distance? I don’t think there’d be any problem if you do:
; restraints for distances
[ intermolecular_interactions ]
[ distance_restraints ]
; ai aj type index type’ low up1 up2 fac
1610 4650 1 0 1 0.25 0.25 0.25 500
1624 4646 1 1 1 0.33 0.33 0.33 500
579 4646 1 2 1 0.33 0.33 0.33 500