# Easily lookup the origin of the opls\_XXX atom types?

**URL:** <https://gromacs.bioexcel.eu/t/easily-lookup-the-origin-of-the-opls-xxx-atom-types/10849>\
**Category:** User discussions\
**Tags:** forcefield, simulation-setup\
**Created:** [December 18, 2024, 9:19am UTC](https://gromacs.bioexcel.eu/t/easily-lookup-the-origin-of-the-opls-xxx-atom-types/10849 "2024-12-18T09:19:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarvist](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jarvist/32/4119_2.png) [@jarvist](https://gromacs.bioexcel.eu/u/jarvist)\
**Post date:** [December 18, 2024, 9:19am UTC](https://gromacs.bioexcel.eu/t/easily-lookup-the-origin-of-the-opls-xxx-atom-types/10849/1 "2024-12-18T09:19:34Z")

</div>

GROMACS version: 2022.5-Debian\_2022.5\_2 , but I think applies to all versions  
GROMACS modification: No

I have modified the `x2top` definition file for a much more complicated molecule.  
(I’m placing this in the-postscript, as I also wrote some notes on how to do this, for others who are trying to model non-standard things.)

Our use case is a bit strange, in that we don’t actually care for the quality of the resulting force-field: we want a bonafide GROMACS topology as an input for the GRAPPA machine-learning model.

So all we really need to get correct are the non-bonded parameters, for which we need to choose the correct opls\_XXX atom type.

Is there a look-up table somewhere for the GROMACS opls\_XXX atom types, back to the original papers where they are defined?

Many years ago when I last did this, I had to cross-reference the actual Lennard-Jones parameters of an opls\_XXX atom type, with the table in the original papers, to figure out which is which.  
Is there a more structured way to look up the opls\_XXX type?

P.S.  
atomname2type.n2t

```auto
#Atom Type(.itp) Charge? Mass Bonds ((bonded atoms, distances))
C opls_157 -0.18	12.011	4 H 0.108 H 0.108 H 0.108 C 0.150
C opls_158 -0.12 12.011	4 H 0.108 H 0.108 C 0.150 C 0.150
C opls_157 0.145 12.011	4 H 0.108 O 0.141 H 0.108 C 0.150
C opls_157 0.145 12.011	4 H 0.108 H 0.108 O 0.108 C 0.150
C opls_158 0.205 12.011	4 H 0.108 C 0.150 O 0.140 C 0.150
C opls_158 -0.06 12.011	4 H 0.108 C 0.150 C 0.150 C 0.150   

C opls_145 -0.12 12.011	3 C 0.150 C 0.150 H 0.108
C opls_145 -0.12 12.011 3 C 0.133 C 0.150 O 0.140
C opls_235 0.5 12.011 3 C 0.133 N 0.140 O 0.140
C opls_235 0.5 12.011 3 C 0.133 N 0.132 C 0.150
C opls_235 0.5 12.011 3 C 0.133 N 0.132 H 0.108

O opls_236 -0.5 15.9994 1 C 0.123

N opls_238 -0.5 14.0067 3 H 0.108 C 0.140 C 0.150
N opls_238 -0.5 14.0067 3 H 0.108 C 0.132 N 0.123
N opls_238 0 14.0067 2 C 0.140 N 0.123

H opls_140 0.06 1.008 1 C 0.108
H opls_155 0.418 1.008	1 O 0.095
H opls_241 0.30 1.008	1 N 0.095

O opls_154 -0.683 15.9994 2 C 0.140 H 0.095
P opls_393 1 30.97376 4 O 0.180 O 0.180 O 0.180 O 0.180
O opls_395 -1 15.9994	2 P 0.180 H 0.095
O opls_394 -1 15.9994 1 P 0.180
N opls_237 0 14.0067 4 C 0.140 C 0.140 C 0.140 C 0.140

# x2top hacking
#
# x2top purely uses a distance critereon to define bonding.
#
# Key line is in mk_bonds,
# && (std::fabs(blen - nmt[i].blen[j]) <= 0.1
# * nmt[i].blen[j]))
#
# You see it is reading the t_nm2type nmt[] for the bond
# definition, and seeing if the bond length is within 10% of
# this distance.
#
# nmt[] is essentially this file, put into a C array
#
# So x2top will bond things it recognises from this file.
# Helpfully it tells you the element and atom number for things it doesn't
# recognise. 
#
# So if you have your molecule of interest open in an editor (such as Pymol, or
# probably more ideally Gaussview) that can tell you the atom index, and can
# calculate the distances for the nearby bonds, you can quickly write a line
# adding the local chemical space and defining what the opls_XXX type should
# be. 

# Frost group additions, for organic electron materials ==> Grappa
#
# NB: I just went with the first opls type I spotted to get this working!
# Requires more thought.

F opls_719 0 18.998 1 C 0.14 

# aromatic carbons buried in the fused ring
C opls_235 0.0 12.011 3 C 0.133 C 0.133 C 0.133
N opls_238 0.0 14.0067 3 C 0.142 C 0.142 C 0.150  

# alphatic carbon dangling off the nitrogen
C opls_158 -0.12 12.011	4 H 0.108 H 0.108 C 0.150 N 0.150

# thiophone sulphur
S opls_202 -0.335 32.06 2 C 0.17 C 0.17
# BT sulphur; BT nitrogen
S opls_202 -0.335 32.06 2 N 0.16 N 0.16
N opls_251 -0.49 14.00670 2 S 0.16 C 0.13

# C-C#N terminating thingies - will these even exist as OPLS atom types?
N opls_251 -0.49 14.00670 1 C 0.12
C opls_235 0.0 12.0011 2 N 0.12 C 0.14

# carbons as part of the main flat fused rings with sulphur
C opls_145 -0.12 12.011	3 C 0.14 C 0.14 S 0.17

# carbons, as in benzene, but with a flourine 
C opls_145 -0.12 12.011	3 C 0.14 C 0.14 S 0.17
C opls_145 -0.12 12.011	3 C 0.150 C 0.150 F 0.13

```

---

<div class="post-metadata">

**Author:** ![jarvist](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jarvist/32/4119_2.png) [@jarvist](https://gromacs.bioexcel.eu/u/jarvist)\
**Post date:** [December 18, 2024, 4:14pm UTC](https://gromacs.bioexcel.eu/t/easily-lookup-the-origin-of-the-opls-xxx-atom-types/10849/2 "2024-12-18T16:14:44Z")

</div>

I’ve reminded myself that the most useful source of references for where the OPLS parameters have come from is in `atomtypes.atp` .

```auto
; OPLS atom types and masses.
; Atom types are named opls_X, where X is the OPLS number.
; The opls_ prefix is to avoid users confusing atom types
; (always prefixed) with atom numbers in molecules (never prefixed).
;
; Types 1-134 are from the united-atom OPLS, which can be
; useful for solvents and/or CH2 optimizations (e.g. in lipids).
; Explicit all-atom parameters start with opls_135.
; Note: For UA amide parameters -
; NMA - types 1,2,3,4,7,39
; Formamide 131,2,12,13
; DMF 131,2,3,132
; Acetamide 1,2,7,12,13
;
; Types 1-65 are united-atom parameters for proteins,
; see JACS 110, 1657 (1988).
;

```

But I’d still be very interested if there was a more automated manner of cross-referencing!
