From 2ed7d366a6937a366e3f8b642469c8ab0ddcb88a Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 24 Sep 2015 20:16:09 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14057 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- .../cnad-cnt/README_step2_run_moltemplate.sh | 6 +++++- .../cnad-cnt/cnad-cnt.in | 2 +- tools/moltemplate/src/ltemplify.py | 15 ++++++++------- tools/moltemplate/src/moltemplate.sh | 4 ++-- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/tools/moltemplate/examples/file_conversion_examples/convert_LAMMPS_to_LT_examples/cnad-cnt/README_step2_run_moltemplate.sh b/tools/moltemplate/examples/file_conversion_examples/convert_LAMMPS_to_LT_examples/cnad-cnt/README_step2_run_moltemplate.sh index c99d4b9729..6903a855f9 100755 --- a/tools/moltemplate/examples/file_conversion_examples/convert_LAMMPS_to_LT_examples/cnad-cnt/README_step2_run_moltemplate.sh +++ b/tools/moltemplate/examples/file_conversion_examples/convert_LAMMPS_to_LT_examples/cnad-cnt/README_step2_run_moltemplate.sh @@ -7,7 +7,11 @@ moltemplate.sh system.lt -# This will generate various files with names ending in *.in* and *.data. +# (Note: If you have VMD installed, try this instead:) +# moltemplate.sh system.lt -vmd + + +# Moltemplate will generate various files with names ending in *.in* and *.data. # These files are the input files directly read by LAMMPS. # Optional: diff --git a/tools/moltemplate/examples/file_conversion_examples/convert_LAMMPS_to_LT_examples/cnad-cnt/cnad-cnt.in b/tools/moltemplate/examples/file_conversion_examples/convert_LAMMPS_to_LT_examples/cnad-cnt/cnad-cnt.in index 64eef828da..1f403e2bd0 100644 --- a/tools/moltemplate/examples/file_conversion_examples/convert_LAMMPS_to_LT_examples/cnad-cnt/cnad-cnt.in +++ b/tools/moltemplate/examples/file_conversion_examples/convert_LAMMPS_to_LT_examples/cnad-cnt/cnad-cnt.in @@ -33,7 +33,7 @@ pair_coeff 15 15 0.02 3.0 pair_coeff 16 16 0.02 3.0 group cnt type 1 -group cnad type 2-16 +group cnad type 2:16 displace_atoms cnad move 0 -7 0 units box special_bonds charmm diff --git a/tools/moltemplate/src/ltemplify.py b/tools/moltemplate/src/ltemplify.py index 01ca815c5a..83987956ea 100755 --- a/tools/moltemplate/src/ltemplify.py +++ b/tools/moltemplate/src/ltemplify.py @@ -670,9 +670,10 @@ try: # avec, bvec, cvec are the axis of the parallelepiped which # define the simulation's boundary. They are described here: #http://lammps.sandia.gov/doc/Section_howto.html#howto-12 - if ((not boundary_xlo) or (not boundary_xhi) or - (not boundary_ylo) or (not boundary_yhi) or - (not boundary_zlo) or (not boundary_zhi)): + if ((boundary_xlo==None) or (boundary_xhi==None) or + (boundary_ylo==None) or (boundary_yhi==None) or + (boundary_zlo==None) or (boundary_zhi==None)): + raise InputError('Error: The DATA file lacks a boundary-box header. You must specify:\n' ' xlo xhi ylo yhi zlo zhi (and xy xz yz if triclinic)\n' ' These numbers should appear before the \"Atoms\" section.\n' @@ -823,14 +824,14 @@ try: # Read the next line of text but don't skip comments comment_char_backup = lex.commenters lex.commenters = '' - line_orig = lex.ReadLine() + line = lex.ReadLine() lex.commenters = comment_char_backup comment_text = '' - ic = line_orig.find('#') + ic = line.find('#') if ic != -1: - line = line_orig[:ic] - comment_text = line_orig[ic+1:].strip() + line = line[:ic] + comment_text = line[ic+1:].strip() line = line.rstrip() if line.strip() in data_file_header_names: diff --git a/tools/moltemplate/src/moltemplate.sh b/tools/moltemplate/src/moltemplate.sh index d42202a869..bb459f003a 100755 --- a/tools/moltemplate/src/moltemplate.sh +++ b/tools/moltemplate/src/moltemplate.sh @@ -9,8 +9,8 @@ # All rights reserved. G_PROGRAM_NAME="moltemplate.sh" -G_VERSION="1.32" -G_DATE="2015-8-17" +G_VERSION="1.33" +G_DATE="2015-9-22" echo "${G_PROGRAM_NAME} v${G_VERSION} ${G_DATE}" >&2 echo "" >&2