From: Pawel Kedzierski (pawel.kedzierski_at_pwr.edu.pl)
Date: Thu May 13 2021 - 08:06:06 CDT

Dear all,

I have found a bug in the nanotube plugin. The structures were always
generated with dihedrals and impropers, independent on the settings.
This prevented the carbon NT and graphene sheets from being directly
usable in modeling. As the plugin uses CHARMM36 atom type CA for all
carbons, which has all necessary parameters provided *besides*
impropers, a structure generated without impropers may be used for
modeling with just the standard par_all36_prot.prm CHARMM FF file. Note
that CGenFF multi-ring aromatic molecules have the same carbon
parameters as CA so they seem to be a rather sensible choice.

This is also the reason why I changed the default GUI setting of
Extensions→Modeling→Nanotube Builder to disable impropers.

You can apply the patch pasted below by applying this command in the VMD
install directory:

patch -p1 < path/to/patch/file

With regards,

Paweł

--- a/plugins/noarch/tcl/nanotube1.6/graphene.tcl
+++ b/plugins/noarch/tcl/nanotube1.6/graphene.tcl
@@ -177,14 +177,15 @@
          if {($cmdline(-a) == "on") || ($cmdline(-a) == 1)} {
              ::TopoTools::guessangles $sel
          }
- if {($cmdline(-d) == "on") || ($cmdline(-a) == 1)} {
+ if {($cmdline(-d) == "on") || ($cmdline(-d) == 1)} {
              ::TopoTools::guessdihedrals $sel
          }
- if {($cmdline(-i) == "on") || ($cmdline(-a) == 1)} {
+ if {($cmdline(-i) == "on") || ($cmdline(-i) == 1)} {
              ::TopoTools::guessimpropers $sel {tolerance 5}
          }
      }
      mol reanalyze $mol
+
      ::TopoTools::adddefaultrep $mol
  
      $sel set resid [$sel get serial]
--- a/plugins/noarch/tcl/nanotube1.6/gui.tcl
+++ b/plugins/noarch/tcl/nanotube1.6/gui.tcl
@@ -26,7 +26,7 @@
      variable bonds 1 ; # generate bonds
      variable angles 1 ; # generate angles
      variable dihedrals 1 ; # generate dihedrals
- variable impropers 1 ; # generate impropers
+ variable impropers 0 ; # do not generate impropers
  
  }
  package provide nanotube $::Nanotube::version
--- a/plugins/noarch/tcl/nanotube1.6/nanotube.tcl
+++ b/plugins/noarch/tcl/nanotube1.6/nanotube.tcl
@@ -217,10 +217,10 @@
          if {($cmdline(-a) == "on") || ($cmdline(-a) == 1)} {
              ::TopoTools::guessangles $sel
          }
- if {($cmdline(-d) == "on") || ($cmdline(-a) == 1)} {
+ if {($cmdline(-d) == "on") || ($cmdline(-d) == 1)} {
              ::TopoTools::guessdihedrals $sel
          }
- if {($cmdline(-i) == "on") || ($cmdline(-a) == 1)} {
+ if {($cmdline(-i) == "on") || ($cmdline(-i) == 1)} {
              ::TopoTools::guessimpropers $sel {tolerance 45}
          }
      }