[gmx-users] g_x2top

Andrew DeYoung adeyoung at andrew.cmu.edu
Wed Feb 8 19:17:39 CET 2012


I am running Gromacs 4.5.5.  I am using a colleague's homemade forcefield,
and I am trying to use g_x2top to generate a .top topology file from a .gro
configuration file.  This should be possible, because my colleague's
forcefield contains a file to translate atom names into atom types (a .n2t
library file).

My configuration file is called conf.gro.  I run g_x2top using the command:

g_x2top -f conf.gro -o out.top -ff select

The program prompts me for a forcefield, and I choose my colleague's
forcefield, which is located in my working directory.  g_x2top runs for a
few minutes and ultimately gives this error message:

Program g_x2top, VERSION 4.5.5
Source code file: g_x2top.c, line: 206

Fatal error:
Could only find a forcefield type for 7147 out of 7216 atoms

g_x2top also gives me many other error messages of the form (I get 69 such
messages, where 69 is exactly the number of atoms for which g_x2top could
not find a forcefield type):

"Can not find forcefield for atom X-INDEX with # bonds"

where X is an atom name, INDEX is that atom's index in conf.gro, and # is
the number of bonds.

For example, one of these error messages is "Can not find forcefield for
atom B0-6067 with 3 bonds", and I am wondering if you can please give me
advice on this.  B0 is indeed an atom name (for boron) and in conf.gro, atom
6067 is indeed B0.  However, my conf.gro is written such that B0 6067 is
surrounded by four fluorine atoms, since the residue is the anion boron
trifluoride (BF4-):

  287BF4     B0 6067   1.302   2.728  16.210  0.0905  0.7350 -1.6601
  287BF4     F1 6068   1.237   2.622  16.271  0.3710 -0.9520  0.6277
  287BF4     F2 6069   1.267   2.739  16.082  0.9097 -0.5184 -0.3121
  287BF4     F3 6070   1.425   2.712  16.219  0.2955 -0.5337 -0.0541
  287BF4     F4 6071   1.262   2.846  16.270  0.6101 -0.5227  0.5296

where the boron-fluorine bond lengths here are 0.138499 nm, 0.133154 nm,
0.124362 nm, and 0.13829 nm, respectively.

My colleague's .n2t file contains the following line (among many others):

B0 B 1.1504 10.8100 4 F1 0.1390 F2 0.1390 F3 0.1390 F4 0.1390

which means, I think, that g_x2top expects each boron atom to be surrounded
by four fluorine atoms with the bond length 0.1390 nm.

My question is, why does g_x2top think that boron B0-6067 is bonded to only
3 atoms: "Can not find forcefield for atom B0-6067 with 3 bonds"?  Is it
that the B0-F3 bond length (0.124362 nm) in conf.gro is just too far from
the bond length that it expects (0.1390 nm)?  Is there any way to get around
this, to tell g_x2top to be more liberal in accepting bonds?  (Probably not,
because in http://manual.gromacs.org/current/online/x2top.html I do not see
any options to modify this, and I understand that the atom selection is
primitive.)  The problem is, I guess, that the conf.gro that I have is not a
starting configuration; it is from some frame during my colleague's
simulation, when bonds were stretched and compressed, etc.

Do you have any advice whereby I could still use this non-starting

Thanks so much.

Andrew DeYoung
Carnegie Mellon University

More information about the gromacs.org_gmx-users mailing list