ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/utilities/waterBoxer
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/utilities/waterBoxer (file contents):
Revision 3113 by gezelter, Tue Jan 9 03:42:14 2007 UTC vs.
Revision 3123 by chrisfen, Tue Mar 6 00:01:51 2007 UTC

# Line 3 | Line 3
3   # program that builds water boxes
4  
5   # author    = "Chris Fennell
6 < # version   = "$Revision: 1.2 $"
7 < # date      = "$Date: 2007-01-09 03:42:14 $"
6 > # version   = "$Revision: 1.4 $"
7 > # date      = "$Date: 2007-03-06 00:01:51 $"
8   # copyright = "Copyright (c) 2006 by the University of Notre Dame"
9   # license   = "OOPSE"
10  
# Line 170 | Line 170 | if ($lattice == 0){
170    }
171   } elsif ($lattice == 1){
172    $crystalNumReal = ($nMol/1.0)**(1.0/3.0);
173 <  $crystalNum = int($crystalNumReal);
173 >  $crystalNum = int($crystalNumReal + $tolerance);
174    $remainder = $crystalNumReal - $crystalNum;
175    
176    # again, if crystalNumReal wasn't an integer, we bump the crystal to the next
# Line 256 | Line 256 | if ($lattice == 0) {
256    $zCorr[3] = $cell2Z;
257   # assemble the lattice
258    $counter = 0;
259 <  for ($z = 0; $z < $nx; $z++) {
259 >  for ($z = 0; $z < $nz; $z++) {
260      for ($y = 0; $y < $ny; $y++) {
261 <      for ($x = 0; $x < $nz; $x++) {
261 >      for ($x = 0; $x < $nx; $x++) {
262          for ($uc = 0; $uc < 4; $uc++) {
263            $xCorr[$uc+$counter] = $xCorr[$uc] + $cellLengthX*$x;
264            $yCorr[$uc+$counter] = $yCorr[$uc] + $cellLengthY*$y;
# Line 277 | Line 277 | if ($lattice == 0) {
277    $zCorr[0] = $cell2Z;
278   #assemble the lattice
279    $counter = 0;
280 <  for ($z = 0; $z < $nx; $z++) {
280 >  for ($z = 0; $z < $nz; $z++) {
281      for ($y = 0; $y < $ny; $y++) {
282 <      for ($x = 0; $x < $nz; $x++) {
282 >      for ($x = 0; $x < $nx; $x++) {
283          $xCorr[$counter] = $xCorr[0] + $cellLengthX*$x;
284          $yCorr[$counter] = $yCorr[0] + $cellLengthY*$y;
285          $zCorr[$counter] = $zCorr[0] + $cellLengthZ*$z;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines