Inserting mobile anions in a polymer-cation system

Hi users, using pcff force field I am be able to construct a polymer chain with cation monomer. The SMILES string of the monomer is like this:


And in the last post I uploaded, the missing rules were probably due to the wrong SMILES that I input. There is an imidazole ring on the monomer structure and C-N+ and C-C are not double bonds but partial double bonds, so I just used lower case to represent the ring structure. (sorry for my poor chemistry) I can execute the .esh and build.emc files successfully.

But here comes a problem, how could I insert anions such as Cl- or bistriflimide- NTf2 to make the whole system neutral? My OPTIONS section is like this:

replace true
mass true
field pcff
number false
ntotal 288
density 0.85
build_dir .
field_debug reduced
charge true

I followed an example polymer.esh in the /v9.4.4/examples/setup/chemistry/polymer/biphase, on which it defined [Na+].[Cl-] salts in GROUPS. So I tried to define pure Cl- anion [Cl-] in my esh GROUPS.

chloride [Cl-]
bmim CCCC[n+]1cn(CC)cc1,1, bmim:2
methyl *C,1, bmim:1,1, bmim:2

And in the CLUSTER, I defined their mass portions

chloride chloride,355
poly random,1540

And in the POLYMERS, I defined how many monomers should be on a backbone

1 bmim,10,methyl,2

This esh file can be executed smoothly, but the build.emc file returned an error:

Error: core/system.c:413 SystemChecks:
Total charge of system ‘main’ does not equal zero (charge = -10).
Program aborted.

I was confused be cause the mass of 10 monomers + 2 terminators should be 1540, and 10 Cl- anions should be 355, 10 cations and 10 anions yield a neutral system, why the error says the charge of the system is not equal to zero? Did I do something wrong in the GROUPS or CLUSTERS sections?

To those read this post and those who could offer some help, your replies are highly appreciated. Thank you all!!!

Dear User,

Due to peculiarities of the text editor of this site, it is not quite clear to me what the exact SMILES of your BMIM monomer is. A tip is to put your literal text between two backquotes ` – typically upper left corner of your keyboard – to counteract these peculiarities. Coming to your question, I assume, that your monomer has the following SMILES:


or, if written in a more linear way,


The easiest way to account for counterions is to add them to your monomer directly

bmim	*C(n1c[n+](CCCC)cc1)C*.[Cl-], 1,bmim:2
methyl	*C, 1,bmim:1, 1,bmim:2

This mitigates the need for having to define an extra group for counterions. Now coming back to your particular problem: it could well be, that the force field you chose is not capable of typing BMIM as an anion. You can check this by adding

field_debug	reduced

to your options section or add


as a command line option while executing your EMC Setup script. This will show how your force field’s typing rules are applied after executing EMC with the resulting build.emc. Additionally – after execution – the file debug.emc is written out, provided the at least first typing round was successful. The section

(* Groups *)

in debug.emc holds your group definitions. You can add up all the charges for BMIM to assure yourself, that the total charge without the chlorine anion equals +1. If not, then you will have to revisit your force field definitions. Please note that you only invoke field_debug when hunting for errors, otherwise it is advised to be omitted.

Hi there developer! Yes your guess is right. The SMILES you wrote is the same as mine. I tried your new SMILES and put the Cl- anion in the monomer. After looking up the * Groups * section in debug.emc file, I found that all the total charge without the Cl- anion is 0, rather than +1. I think this is the reason for the error. Then I looked up the pcff.frc file

*atom_types cff91

section which defines the pcff parameters and found that there is indeed ni, which is the nitrogen atom in the imidazole ring, but there is no nitrogen cation in the imidazolium. (Sorry for the confusion, my structure actually contains imidazolium with one N atom and one N+ cation, instead of two N atoms on an imidazole ring) I might add the relevant parameters for the nitrogen cation on the imidazolium to account for the structure.

Thanks! Much appreciated!