EMC - Best method to create a certain amount of polymer chains containing 'x' amount of monomers? For Random Copolymers

Hi,

Im trying to create a random copolymer and am running into some difficultly.

I want to create 5 chains of 150 monomers each, with a 60 to 40 mol% for the copolymers.

Is there some way to define this instead of defining the ntotal?

Im running into this error when trying to create this system.

“Error: core/script/clusters/polymer.c:952 ScriptClustersPolymerInit:
No matching branch for connecting group ‘PHB’ to ‘PHV’.
Program aborted.”

Attached is my polymer.esh file.

I found the fix, I didn’t add a bond from PHB to PHV.

To make 5 chains of 150 monomers each:
in the options section, you take out ntotal and put number = true, for the number 5 (chains) in cluster to take. Then you have the 150 after describing the weights in the poly section.

Dear User,

Cudos for finding the solution on your own. You were two seconds before me. Indeed, you did forget a connection. The full .esh file in scrollable textual form you find below. You can accomplish this yourself by starting and ending your code snippet by three single back quotes ```. This way, people can actually copy the problem (and of course the solution) to help you more quickly. Please be aware, that when you are interested in polymer properties, you would be advised to have at least 100 polymer molecules in your simulation. I also noticed, that you did not specify any density. I would assume, that the actual density of your polymer at T = 300K is not 1 g/cc. The density for e.g. polylactic acid is 1.2 - 1.4 g/cc.

#!/usr/bin/env emc_setup.pl

# Options section

ITEM	OPTIONS

field		pcff
field_increment	warn
#field_debug	reduced
density		1.3
mass		true
replace		true
number		true
emc_execute	true

ITEM	END	# OPTIONS

# Groups section

ITEM	GROUPS

PHB		*CC(=O)OC(*)C,1,PHB:2,1,PHV:2
PHV		*CC(=O)OC(*)CC,1,PHV:2,1,PHB:2
methyl		*C,1,PHB:1,1,PHB:2,1,PHV:1,1,PHV:2

ITEM	END	# GROUPS

# Clusters section

ITEM	CLUSTERS

poly		random,100

ITEM	END	# CLUSTERS

# Polymers

# Polymers section

ITEM	POLYMERS

poly
1		PHB:PHV=6:4,150,methyl,2

ITEM	END	# POLYMERS