Dear Moltemplate users,
I am trying to create a PDMS modeling.
Currently, I’ve create a C2H6OSi monomer. However, I am unable to create a polymer chain by “new” command.
I’ve tried the butane examples included in the package and the toy polymer example on the website(Moltemplate Examples). They works well. So I modified the polymer.lt file of them, but my data file of PDMS only shows one single monomer (no any error message coming out).
Here is my code of polymer chain:
import “PDMS_monomer.lt” # ← defines “Monomer” and “PForceField”
#Define the “Polymer” molecule type:
Polymer inherits PForceField {
create_var {$mol} #Optional: Force all monomers to share the same molecule-ID
#Make a list of monomers:
mon1 = new Monomer
mon2 = new Monomer.rot(180.0, 1,0,0).move(3.2,0,0)
mon3 = new Monomer.move(6.4,0,0)
mon4 = new Monomer.rot(180.0, 1,0,0).move(9.6,0,0)
mon5 = new Monomer.move(12.8,0,0)
mon6 = new Monomer.rot(180.0, 1,0,0).move(16.0,0,0)
mon7 = new Monomer.move(19.2,0,0)
}
#Now, link the monomers together this way:
write(“Data Bonds”) {
$bond:backbone1 @bond:Backbone $atom:mon1/O $atom:mon2/Si
$bond:backbone2 @bond:Backbone $atom:mon2/Si $atom:mon3/O
$bond:backbone3 @bond:Backbone $atom:mon3/O $atom:mon4/Si
$bond:backbone4 @bond:Backbone $atom:mon4/Si $atom:mon5/O
$bond:backbone5 @bond:Backbone $atom:mon5/O $atom:mon6/Si
$bond:backbone6 @bond:Backbone $atom:mon6/Si $atom:mon7/O
}
} # Polymer
Since there is no any error message, so I can not find out the mistake here.
I appreciate any suggestion and help.