Missing rules error for simple polymer with OPLS-AA

Hi all,

I am a very new user of EMC and am trying to build polymers representative of anion-exchange membranes similar to this work: https://doi.org/10.1021/acsapm.1c01798. I downloaded EMC on my macOS laptop two weeks ago, so I have the most recent version.

My test system consists of a chain of benzene rings, with the ultimate goal of adding in fluorocarbons and cationic groups at certain sites on the benzenes.

I have tried my simple chain of benzene rings in EMC using the OPLS-UA force field and, as far as I can tell, everything works (using vmd -e command + looking at data file).

When I switch to OPLS-AA, I get the “missing rules” error:

Info: applying '~/emc/v9.4.4/field/opls/2012/opls-aa.prm'

Warning: no rule found for {group, site} = {test, 0}.
Warning: no rule found for {group, site} = {test, 1}.
Warning: no rule found for {group, site} = {test, 2}.
Warning: no rule found for {group, site} = {test, 3}.
Warning: no rule found for {group, site} = {test, 4}.
Warning: no rule found for {group, site} = {test, 5}.
Warning: no rule found for {group, site} = {test, 6}.
Warning: no rule found for {group, site} = {test, 7}.
Warning: no rule found for {group, site} = {test, 8}.
Warning: no rule found for {group, site} = {test, 9}.
Warning: no rule found for {group, site} = {terminator, 0}.
Warning: no rule found for {group, site} = {terminator, 1}.
Warning: no rule found for {group, site} = {terminator, 2}.
Warning: no rule found for {group, site} = {terminator, 3}.
Warning: no rule found for {group, site} = {terminator, 4}.
Warning: no rule found for {group, site} = {terminator, 5}.
Warning: no rule found for {group, site} = {terminator, 6}.
Warning: no rule found for {group, site} = {terminator, 7}.
Warning: no rule found for {group, site} = {terminator, 8}.
Warning: no rule found for {group, site} = {terminator, 9}.
Warning: no rule found for {group, site} = {terminator, 10}.

Error: core/fields.c:433 FieldsApply:

Missing rules.

Program aborted.

I have tried typing my SMILES strings as:

test         *c1ccc*cc1
terminator   *c1ccccc1    

but still encounter the same issue. This error has persisted even when I add a methyl group separating the benzene rings (but still runs with OPLS-UA) as I wasn’t 100% sure on my atom type for the benzenoid carbon connecting to the next ring.

Based on the .prm files, it seems that OPLS-AA should have the requisite atom types (ca, ha, ct). I have read through the discussions regarding adding rules to OPLS-AA, but I don’t understand the architecture of the .define, .prm, and .top well enough to fix my own problem. I have copied my input file below as I am not allowed to attach it.

Many thanks in advance for any help!

#!/usr/bin/env emc.pl

# Options

ITEM		OPTIONS

project		benzene_chain
field		opls-aa
#field 		opls-ua
number 		false
ntotal		1000
mass		true
replace		true
#field_debug reduced 

ITEM		END

# Groups

ITEM		GROUPS

test		*c1:cc:c*c:c1, 1, test:2

terminator	*c1:cc:cc:c1, 1, test:1, 1, test:2
#terminator	*c1ccccc1, 1, test:1, 1, test:2

ITEM		END

# Clusters

ITEM		CLUSTERS

poly		alternate,1

ITEM		END

# Polymers

ITEM		POLYMERS

poly
1			test, 5, terminator, 2

ITEM		END
1 Like

Hello,

I was also going to create a similar topic. Since the last release, I cannot build simple polymer (polystyrene) melt with opls-aa. Taking the opls-aa forcefield files from the previous release fix the problem of missing rules, so the problem come from the updated forcefield files.

Dear users,

My apologies for the late reply. I have been on vacation for the past three weeks. I was not aware of the issues with OPLS-AA. In the meanwhile, I have created a 2024 version of OPLS-AA, which uses bond increments for partial charge assignment. This allows for a more general and flexible force field. I would suggest to install the following two files

opls-aa.prm (62.2 KB)
opls-aa.top (13.3 KB)

in $EMC_ROOT/field/opls/2024. This allows them to be accessed through field opls/2024/opls-aa as is illustrated by the following example:

# Options section

ITEM	OPTIONS

replace		true
field		opls/2024/opls-aa
density		0.1
radius		10
nrelax		500
number		true
focus		true
pdb_licorice	true
emc_execute	true

ITEM	END	# OPTIONS

# Groups section

ITEM	GROUPS

m1		*c1ccc(cc1)*, 1, m1:2
t1		*c1ccccc1, 1, m1:2
t2		*c1ccccc1, 1, m1:1

ITEM	END	# GROUPS

# Clusters section

ITEM	CLUSTERS

polymer		alternate,1

ITEM	END	# CLUSTERS

# Polymers section

ITEM	POLYMERS

polymer
1		m1,10,t1,1,t2,1

ITEM	END	# POLYMERS

I have increased radius and nrelax since polyphenylene is rather stiff. Note that OPLS-AA has a native type C! for bridging aromatic carbons between two phenyl rings which is captured by type c3ab in OPLS-AA 2024.

I will have to upload a new version of EMC, since the current version does not understand ^6 ring designations in rules well. I will post an update here, once this new version has been uploaded for all compilation targets. This 2024 version of OPLS-AA is still experimental. Please let me know, if you experience any issues.

For the 2012 version of OPLS-AA one can use the files as provided by the 2023 release of EMC:

opls-aa.prm (34.9 KB)
opls-aa.top (30.0 KB)

1 Like

Dear Veld,

I’m encountering an issue similar to what Nicole reported last year, with a small twist. I’m building an anion-exchange membrane in EMC where the polymer chain contains an aromatic biphenyl unit and a piperidinium cationic headgroup. The DP group is:

DP:c=o *c1ccc(cc1)c1ccc(cc1)C2(*)CC[N+](CC2)(C)C ,1,DP:2

The system builds and runs fine with pcff, but fails with opls-aa force field:

Warning: no rule found for {group, site} = {DP, 0}.
Warning: no rule found for {group, site} = {DP, 15}.
Error: core/fields.c:433 FieldsApply:
       Missing rules.

To isolate the cause, I tested various monomers. opls-aa works for:

  • DP:c=o *c1ccc(cc1)c1ccc(cc1)C(*)CC[N+](CC)(C)C ,1,DP:2 # aromatic biphenyl + aliphatic chain
  • DP:c=o *c1ccc(cc1)c1ccc(cc1)C(*)CCCCC ,1,DP:2 # aromatic + aliphatic chain
  • DP:c=o *c1ccc(cc1)c1ccc(cc1)CCCCCC(*) ,1,DP:2 # aromatic + aliphatic chain
  • DP:c=o *c1ccc(cc1)c1ccc(cc1)(*) ,1,DP:2 # aromatic only
  • DP:c=o *C1(*)CC[N+](CC1)(C)C ,1,DP:2 # aliphatic ring only

The failure arises specifically when an aromatic ring (biphenyl) is combined with an aliphatic ring (piperidinium). pcff tolerates this while opls-aa does not.

I’ve shared my .esh file for reference. Moreover, I use EMC-pypi to run the codes.

Thanks.

#=======================================================
ITEM  OPTIONS
replace     true
field       opls-aa
#field       pcff
number      true
field_charge false
density     0.05
focus       true
ITEM END
#=======================================================
# Groups
ITEM  GROUPS
DP:c=o              *c1ccc(cc1)c1ccc(cc1)C1(*)CC[N+](CC1)(C)C   ,1,DP:2 
methyl:c=o          *C  ,1,DP:1  ,1,DP:2
ITEM END
#=======================================================
# Clusters
ITEM  CLUSTERS
poly        alternate,  1
ITEM END
#=======================================================
# Polymers
ITEM  POLYMERS
poly
1       DP,3,methyl,2
ITEM END
#=======================================================

Dear user,

Thank you for your report. EMC is telling you, that the appropriate rule is missing in the OPLS-AA deck. The quickest fix is to make a slight alteration to $EMC_ROOT/field/opls/2024/opls-aa.top. Change

36	c3a	C	-	-	0	^6c(^6:c)(^6:c)(C)

to

36	c3a	C	-	-	0	^6c(^6:c)(^6:c)(~C)

This makes the general rule for an aromatic carbon less restrictive. The former explicitly states, that the connected SP3 carbon is not part of any ring. The rule becomes less restrictive by adding a ~. In this case, EMC will not check if an atom is part of a ring and therefore any SP3 carbon is valid. This change will be part of the next EMC distribution.

Thank you very much for your help. Actually, I couldn’t find the exact line you mentioned in the opls-aa.top file, so I added the suggested line to the bottom of the list, and it worked perfectly.