ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/utils/sysBuild.cpp
(Generate patch)

Comparing trunk/OOPSE/utils/sysBuild.cpp (file contents):
Revision 501 by mmeineke, Tue Apr 15 21:20:35 2003 UTC vs.
Revision 536 by mmeineke, Fri May 16 14:28:27 2003 UTC

# Line 41 | Line 41 | int main( int argc, char* argv[]){
41  
42    MakeStamps* the_stamps = NULL;
43    Globals* the_globals = NULL;
44 <  MoleculeStamp** the_components = NULL;
44 >  Component** the_components = NULL;
45    LinkedMolStamp* headStamp = NULL;
46    LinkedMolStamp* currStamp;
47  
48  if(
49  
48    // initialize all functions and variables
49  
50    initSimError();
# Line 61 | Line 59 | int main( int argc, char* argv[]){
59    bsInfo.componentsNmol = NULL;
60    bsInfo.compStamps = NULL;
61    bsInfo.havePressure = 0;
62 <  bsInfo.haveTauBarrostat = 0;
62 >  bsInfo.haveTauBarostat = 0;
63    bsInfo.haveTauThermostat = 0;
64    bsInfo.haveQmass = 0;
65  
# Line 90 | Line 88 | int main( int argc, char* argv[]){
88              simError();
89              usage();
90            }
91 +
92            sysType = BILAYER;
93 +
94 +          i++;
95 +          if( i>=argc ){
96 +            sprintf( painCave.errMsg,
97 +                     "\n"
98 +                     "not enough arguments for bilayer\n");
99 +            painCave.isFatal = 0;
100 +            simError();
101 +            usage();
102 +          }      
103 +          strcpy( bsInfo.lipidName, argv[i] );
104 +          
105 +          i++;
106 +          if( i>=argc ){
107 +            sprintf( painCave.errMsg,
108 +                     "\n"
109 +                     "not enough arguments for bilayer\n");
110 +            painCave.isFatal = 0;
111 +            simError();
112 +            usage();
113 +          }      
114 +          strcpy( bsInfo.waterName, argv[i] );
115 +
116          }
117  
118          else{
# Line 129 | Line 151 | int main( int argc, char* argv[]){
151              if( headInc == NULL ){
152                headInc = new includeLinked;
153                headInc->next = NULL;
154 <              strcopy( headInc->name, argv[i] );
154 >              strcpy( headInc->name, argv[i] );
155              }
156              else{
157                prevInc = headInc;
158                currInc = headInc->next;
159                while( currInc != NULL ){
160                  prevInc = currInc;
161 <                currInc = previnc->next;
161 >                currInc = prevInc->next;
162                }
163                currInc = new includeLinked;
164                currInc->next = NULL;
165 <              strcopy( currInc->name, argv[i] );
165 >              strcpy( currInc->name, argv[i] );
166                prevInc->next = currInc;
167              }
168              
# Line 221 | Line 243 | int main( int argc, char* argv[]){
243    // open and parse the bass file.
244  
245    set_interface_stamps( the_stamps, the_globals );
246 <  yacc_BASS( info.in_name );  
246 >  yacc_BASS( in_name );  
247  
248    // set the easy ones first
249    bsInfo.targetTemp = the_globals->getTargetTemp();
# Line 254 | Line 276 | int main( int argc, char* argv[]){
276        bsInfo.haveTauThermostat = 1;;
277      }
278      else if (the_globals->haveQmass()){
279 <      bsinfo.Qmass = the_globals->getQmass();
279 >      bsInfo.Qmass = the_globals->getQmass();
280        bsInfo.haveQmass = 1;
281      }
282      else {
# Line 308 | Line 330 | int main( int argc, char* argv[]){
330      sprintf( painCave.errMsg,
331               "sysBuild Warning. Unrecognized Ensemble -> %s, "
332               "reverting to NVE for this simulation.\n",
333 <             ensemble );
333 >             bsInfo.ensemble );
334      painCave.isFatal = 0;
335      simError();
336      strcpy( bsInfo.ensemble, "NVE" );
# Line 371 | Line 393 | int main( int argc, char* argv[]){
393    if( the_globals->haveBox() ){
394      bsInfo.boxX = the_globals->getBox();
395      bsInfo.boxY = the_globals->getBox();
396 <    bsinfo.boxZ = the_globals->getBox();
396 >    bsInfo.boxZ = the_globals->getBox();
397    }
398    else if( the_globals->haveDensity() ){
399  
400      double vol;
401 <    vol = (double)tot_nmol / the_globals->getDensity();
401 >    vol = (double)bsInfo.totNmol / the_globals->getDensity();
402      bsInfo.boxX = pow( vol, ( 1.0 / 3.0 ) );
403 <    bsInfo.boxY = simnfo->box_x;
404 <    bsInfo.boxZ = simnfo->box_x;
403 >    bsInfo.boxY = bsInfo.boxX;
404 >    bsInfo.boxZ = bsInfo.boxY;
405    }
406    else{
407      if( !the_globals->haveBoxX() ){
# Line 472 | Line 494 | void usage(){
494                  "\n"
495                  "  long:\n"
496                  "  -----\n"
497 <                "   --bilayer       Tries to build a basic bilayer with the specified number\n"
498 <                "                     of lipids in the input bass file. The bilayer will be\n"
499 <                "                     surrounded by the number of solvent molecules given\n"
500 <                "                     in the bass file.\n"
501 <                "                      -note: combined with \"-r\" the simulation will start in\n"
502 <                "                             an FCC lattice with randomly assigned latice\n"
481 <                "                             sites for all atoms involved.\n"
497 >                "   --bilayer <lipid> <water>  Tries to build a basic bilayer with the specified number\n"
498 >                "                              of lipids in the input bass file. The bilayer will be\n"
499 >                "                              surrounded by the number of solvent molecules given\n"
500 >                "                              in the bass file.\n"
501 >                "                                -note: combined with \"-r\" the simulation will start\n"
502 >                "                                 the lipids randomly oriented in a sea of waters.\n"
503                  "\n"
504                  "\n",
505                  program_name);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines