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

Comparing trunk/src/applications/utilities/waterBoxer (file contents):
Revision 1123 by chrisfen, Tue Mar 6 00:01:51 2007 UTC vs.
Revision 1214 by xsun, Wed Jan 23 21:22:18 2008 UTC

# Line 3 | Line 3
3   # program that builds water boxes
4  
5   # author    = "Chris Fennell
6 < # version   = "$Revision: 1.4 $"
7 < # date      = "$Date: 2007-03-06 00:01:51 $"
6 > # version   = "$Revision: 1.5 $"
7 > # date      = "$Date: 2008-01-23 21:22:18 $"
8   # copyright = "Copyright (c) 2006 by the University of Notre Dame"
9   # license   = "OOPSE"
10  
# Line 103 | Line 103 | if ($waterName eq 'DPD') {
103   if ($waterName eq 'DPD') {
104    # DPD waters are stand-ins for 4 water molecules
105    $density = $density * 0.25;
106 + }
107 + if ($waterName eq 'CG2') {
108 +  # CG2 waters are stand-ins for 2 water molecules
109 +  $density = $density * 0.5;
110   }
111  
112   if (defined($opt_l)){
# Line 439 | Line 443 | sub printWaterMD {
443    printSPCE();
444    printSPC();
445    printDPD();
446 +  printCG2();
447    print WATERMD "\n\n#endif";
448   }
449  
# Line 760 | Line 765 | sub printDPD {
765   }"
766   }
767  
768 + sub printCG2 {
769 +  print $waterFileHandle "\n\nmolecule{
770 +  name = \"CG2\";
771 +  
772 +  atom[0]{
773 +    type = \"CG2\";
774 +    position(0.0, 0.0, 0.0);
775 +  }
776 + }"
777 + }
778  
779   sub printFakeWater {
780    print $waterFileHandle "\n\nmolecule{
# Line 788 | Line 803 | sub validateWater {
803    elsif ($waterName eq 'SPCE')     { $waterCase = 11;   }
804    elsif ($waterName eq 'SPC')      { $waterCase = 12;   }
805    elsif ($waterName eq 'DPD')      { $waterCase = 13;   }
806 +  elsif ($waterName eq 'CG2')      { $waterCase = 14;   }
807    else                             { $invalidWater = 1; }
808   }
809  
# Line 806 | Line 822 | sub printWaterModel {
822    elsif ($waterCase == 11) { printSPCE();    }
823    elsif ($waterCase == 12) { printSPC();     }
824    elsif ($waterCase == 13) { printDPD();     }
825 +  elsif ($waterCase == 14) { printCG2();     }
826   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines