Skip to content

Commit

Permalink
fixed a bug in "interpolate_curve.py" (preventing scaling of coordina…
Browse files Browse the repository at this point in the history
…tes correctly by the 2nd argument)
  • Loading branch information
jewettaij committed Apr 12, 2020
1 parent 1e47e0b commit 19dc506
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion doc/doc_genpoly_lt.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ from the terminal) and a python library. The former is documented below.
arguments are integer offsets. To point monomer i in the direction
connecting it to the following monomer (i+1), use -dir-indices 0 1.
arguments are integer offsets. To point monomer i in the direction
connecting it to the previous monomer (i-1), use -dir-indices 0 -1.
connecting it to the previous monomer (i-1), use -dir-indices -1 0.
(Note: If the -polymer-directions argument is used, and the current
polymer has a direction of -1, the indices ia, ib will be flipped.)
For circular polymers, the indices will be wrapped appropriately.
Expand Down
6 changes: 3 additions & 3 deletions moltemplate/genpoly_lt.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,9 @@ def ChooseDirections(self, coords):
else:
for i in range(1, N - 1):
for d in range(0, 3):
self.direction_vects[i][d] = coords[
i + self.settings.dir_index_offsets[1]][d] - coords[
i + self.settings.dir_index_offsets[0]][d]
self.direction_vects[i][d] = (coords[i + self.settings.dir_index_offsets[1]][d]
-
coords[i + self.settings.dir_index_offsets[0]][d])

for d in range(0, 3):
self.direction_vects[0][d] = coords[1][d] - coords[0][d]
Expand Down
14 changes: 7 additions & 7 deletions moltemplate/interpolate_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# All rights reserved.

g_program_name = __file__.split('/')[-1] # = 'interpolate_curve.py'
g_version_str = '0.3.0'
g_date_str = '2019-12-12'
g_version_str = '0.3.1'
g_date_str = '2020-4-11'

g_usage_str = """
Usage:
Expand Down Expand Up @@ -355,13 +355,13 @@ def main():

if (i_new < n_new-1):
for d in range(0, g_dim):
x_new[i_new][d] = scale*(x_orig[i_orig][d]
+
i_remainder*(x_orig[i_orig+1][d]-
x_orig[i_orig][d]))
x_new[i_new][d] = (x_orig[i_orig][d]
+
i_remainder*(x_orig[i_orig+1][d]-
x_orig[i_orig][d]))
else:
for d in range(0, g_dim):
x_new[i_new][d] = scale*x_orig[n_orig-1][d]
x_new[i_new][d] = x_orig[n_orig-1][d]

else:
x_new = ResampleCurve(x_orig, n_new, spline_exponent_alpha)
Expand Down
4 changes: 2 additions & 2 deletions moltemplate/scripts/moltemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# Copyright (c) 2013

G_PROGRAM_NAME="moltemplate.sh"
G_VERSION="2.17.3"
G_DATE="2020-4-07"
G_VERSION="2.17.4"
G_DATE="2020-4-11"

echo "${G_PROGRAM_NAME} v${G_VERSION} ${G_DATE}" >&2
echo "" >&2
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@

url='https://github.com/jewettaij/moltemplate',

download_url='https://github.com/jewettaij/moltemplate/archive/v2.17.3.zip',
download_url='https://github.com/jewettaij/moltemplate/archive/v2.17.4.zip',

version='2.17.3',
version='2.17.4',

keywords=['simulation', 'LAMMPS', 'molecule editor', 'molecule builder',
'ESPResSo'],
Expand Down

0 comments on commit 19dc506

Please sign in to comment.