[Moltemplate] Unable to create polymer chain

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.

This is a question for @jewettaij

Thank you Dr. Kohlmeyer. :slight_smile:
Sorry, I can’t find the discussion board for Moltemplate.

My note was added with the purpose of generating an email notification for Andrew.
I don’t think that he has time to watch this forum. According to his user profile he last logged in in Nov 2021…

The alternative is to email him directly. Or create an issue in his github repo at Issues · jewettaij/moltemplate · GitHub

It is not likely that you’ll get help from anybody else. Specifically not here.

Can you provide all the LT files to reproduce this error?

Hello Dr. Otello,

I re-write my force-field and monomer.lt with different way, so I can create a polymer chain now.
For old version, I still don’t know the mistake there.
The attachments are the LT files of old version.
ch3group.lt (2.5 KB)
PDMS_monomer.lt (1.2 KB)
PDMS_polymer.lt (1.2 KB)
PForceField.lt (5.0 KB)

Thank you so much!
I appreciate it.

What is the problem then?