Closed Zoe-Chang1 closed 2 years ago
I try to build an entire big system instead of build the single monomer. I don't know why, but it works now.
Hi Zoe If you send me all of the moltemplate (.LT) files you are using I will have a look. Please also tell me what command you were using to invoke moltemplate.sh. For example:
moltemplate.sh monomer.txt
If this is how you were invoking moltemplate.sh, then it will not work because the "monomer.txt" file does not contain any "new" commands. When you invoke moltemplate.sh, it should probably look like this instead:
moltemplate.sh system.lt
The "system.lt" file contains "new" commands to make copies of one or more PDMS polymers. There is typically a file named "polymer.lt" (or "PDMS.lt", or something similar) which defines what a PDMS polymer is. It will contain "new" commands which make copies of the monomer you defined in "monomer.txt". For examples of this approach, please see: 1) https://moltemplate.org/examples.html#butane 2) https://github.com/jewettaij/moltemplate/tree/master/examples/all_atom/force_field_COMPASS/butane#butane-example 3) https://moltemplate.org/doc/moltemplate_manual.pdf#section.6 (Chapter 6 is only 2 pages long.)
Anyway, if you send me files you are confused about, I will have a look.
Hi Dr. Jewett,
Thank you for the hint! I thought the command write ("Data Atoms") is the one creates the items, so I can create monomer alone by run the monomer.lt files. But I now realize I should run the script that contain the "new" command, i.e., polymer.lt in my case.
Thank you for really kind suggestions!
I'm glad this helped! If it's okay, I will close this issue now.
Dear Moltemplate users,
I have an issue about " There are no atoms in the system".
I build a force-field of PDMS. The force field include atoms I need inside. (The partial code is shown below:)
_PForceField {
write_once("In Init") { units real atom_style full bond_style class2 angle_style quartic dihedral_style opls pair_style buck }
There are 4 atom types: "C" "H" "Si" "O"
writeonce("Data Masses") { @atom:Si 28.085 @atom:C 12.01 @atom:H 1.007 @atom:O 15.999
And I import the force field to my monomer.lt script. (as shown below:)
_import "PForcefield.lt" # contains force-field parameters
monomer inherits PForceField {
write("Data Atoms") {
atomId molId atomType charge x y z
$atom:C1 $mol:... @atom:C 0.0 -0.600714 2.369272 -0.648393 $atom:H1 $mol:... @atom:H 0.0 0.439526 2.758433 -0.590174 $atom:H2 $mol:... @atom:H 0.0 -0.977302 2.505258 -1.68573 $atom:H3 $mol:... @atom:H 0.0 -1.241965 2.958313 0.0432318461 $atom:C2 $mol:... @atom:C 0.0 -2.392134 -0.107249 -0.223331 $atom:H4 $mol:... @atom:H 0.0 -2.823555 0.014571 -1.241173 $atom:H5 $mol:... @atom:H 0.0 -2.40159 -1.186807 0.0434449812 $atom:H6 $mol:... @atom:H 0.0 -3.0274 0.446758 0.502263 } write("Data Bonds") {
bond-id bond-type atom-id1 atom-id2
} }_
However, the Error shows: _Error: There are no atoms in your system. Suggestions:
I also try using "new" in my monomer.lt script:
_import "PForcefield.lt" # contains force-field parameters
mon1 = new Si mon2 = new C mon3 = new O mon4 = new H monomer inherits PForceField {_
It shows: Error(ttree.PtknsToNode()): Class or variable "Si" not found in this context: ".../Si"
Did I do something wrong with creating atoms?
Thank you so much for help and any suggestions in advance
monomer.txt PForcefield.txt .