Changeset 560995 for molecuilder/src/builder.cpp
- Timestamp:
- Jul 23, 2009, 12:32:48 PM (16 years ago)
- Children:
- f39735
- Parents:
- 307290
- File:
-
- 1 edited
-
molecuilder/src/builder.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/builder.cpp
r307290 r560995 562 562 break; 563 563 case 'd': 564 cout << Verbose(0) << "Evaluating prinicipal axis." << endl;565 cout << Verbose(0) << "Shall we rotate? [0/1]: ";566 cin >> Z;567 if ((Z >=0) && (Z <=1))568 mol->PrincipalAxisSystem((ofstream *)&cout, (bool)Z);569 else570 mol->PrincipalAxisSystem((ofstream *)&cout, false);571 break;564 cout << Verbose(0) << "Evaluating prinicipal axis." << endl; 565 cout << Verbose(0) << "Shall we rotate? [0/1]: "; 566 cin >> Z; 567 if ((Z >=0) && (Z <=1)) 568 mol->PrincipalAxisSystem((ofstream *)&cout, (bool)Z); 569 else 570 mol->PrincipalAxisSystem((ofstream *)&cout, false); 571 break; 572 572 case 'e': 573 cout << Verbose(0) << "Evaluating volume of the convex envelope.";574 VolumeOfConvexEnvelope((ofstream *)&cout, NULL, configuration, NULL, mol);575 break;573 cout << Verbose(0) << "Evaluating volume of the convex envelope."; 574 VolumeOfConvexEnvelope((ofstream *)&cout, NULL, configuration, NULL, mol); 575 break; 576 576 case 'f': 577 577 mol->OutputTemperatureFromTrajectories((ofstream *)&cout, mol->MDSteps-1, mol->MDSteps, (ofstream *)&cout); … … 1020 1020 } 1021 1021 break; 1022 case 'A':1023 ExitFlag = 1;1024 if ((argptr >= argc) || (!IsValidNumber(argv[argptr])) || (argv[argptr][0] == '-')) {1025 ExitFlag =255;1026 cerr << "Missing source file for bonds in molecule: -A <bond sourcefile>" << endl;1027 } else {1028 cout << "Parsing bonds from " << argv[argptr] << "." << endl;1029 ifstream *input = new ifstream(argv[argptr]);1030 mol->CreateAdjacencyList2((ofstream *)&cout, input);1031 input->close();1032 }1033 break;1034 case 'N':1035 ExitFlag = 1;1036 if ((argptr+1 >= argc) || (argv[argptr+1][0] == '-')){1037 ExitFlag = 255;1038 cerr << "Not enough or invalid arguments given for non-convex envelope: -o <radius> <tecplot output file>" << endl;1039 } else {1040 cout << Verbose(0) << "Evaluating npn-convex envelope.";1041 string TempName(argv[argptr+1]);1042 TempName.append(".r3d");1043 ofstream *output = new ofstream(TempName.c_str(), ios::trunc);1044 cout << Verbose(1) << "Using rolling ball of radius " << atof(argv[argptr]) << " and storing tecplot data in " << argv[argptr+1] << "." << endl;1045 Find_non_convex_border((ofstream *)&cout, output, mol, argv[argptr+1], atof(argv[argptr]));1046 output->close();1047 delete(output);1048 argptr+=2;1049 }1050 break;1022 case 'A': 1023 ExitFlag = 1; 1024 if ((argptr >= argc) || (!IsValidNumber(argv[argptr])) || (argv[argptr][0] == '-')) { 1025 ExitFlag =255; 1026 cerr << "Missing source file for bonds in molecule: -A <bond sourcefile>" << endl; 1027 } else { 1028 cout << "Parsing bonds from " << argv[argptr] << "." << endl; 1029 ifstream *input = new ifstream(argv[argptr]); 1030 mol->CreateAdjacencyList2((ofstream *)&cout, input); 1031 input->close(); 1032 } 1033 break; 1034 case 'N': 1035 ExitFlag = 1; 1036 if ((argptr+1 >= argc) || (argv[argptr+1][0] == '-')){ 1037 ExitFlag = 255; 1038 cerr << "Not enough or invalid arguments given for non-convex envelope: -o <radius> <tecplot output file>" << endl; 1039 } else { 1040 cout << Verbose(0) << "Evaluating npn-convex envelope."; 1041 string TempName(argv[argptr+1]); 1042 TempName.append(".r3d"); 1043 ofstream *output = new ofstream(TempName.c_str(), ios::trunc); 1044 cout << Verbose(1) << "Using rolling ball of radius " << atof(argv[argptr]) << " and storing tecplot data in " << argv[argptr+1] << "." << endl; 1045 Find_non_convex_border((ofstream *)&cout, output, mol, argv[argptr+1], atof(argv[argptr])); 1046 output->close(); 1047 delete(output); 1048 argptr+=2; 1049 } 1050 break; 1051 1051 case 'T': 1052 1052 ExitFlag = 1; … … 1369 1369 char choice; // menu choice char 1370 1370 Vector x,y,z,n; // coordinates for absolute point in cell volume 1371 double *factor;// unit factor if desired1371 double *factor; // unit factor if desired 1372 1372 bool valid; // flag if input was valid or not 1373 1373 ifstream test;
Note:
See TracChangeset
for help on using the changeset viewer.
