Changeset 848729 for molecuilder/src/builder.cpp
- Timestamp:
- Dec 29, 2008, 9:46:58 PM (17 years ago)
- Children:
- dafe43
- Parents:
- fe3c9a
- git-author:
- Frederik Heber <heber@…> (12/29/08 21:26:43)
- git-committer:
- Frederik Heber <heber@…> (12/29/08 21:46:58)
- File:
-
- 1 edited
-
molecuilder/src/builder.cpp (modified) (3 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/builder.cpp
-
Property mode
changed from
100644to100755
rfe3c9a r848729 259 259 static void CenterAtoms(molecule *mol) 260 260 { 261 Vector x, y ;261 Vector x, y, helper; 262 262 char choice; // menu choice char 263 263 … … 292 292 mol->CenterEdge((ofstream *)&cout, &x); // make every coordinate positive 293 293 mol->Translate(&y); // translate by boundary 294 mol->SetBoxDimension(&(x+y*2)); // update Box of atoms by boundary 294 helper.CopyVector(&y); 295 helper.Scale(2.); 296 helper.AddVector(&x); 297 mol->SetBoxDimension(&helper); // update Box of atoms by boundary 295 298 break; 296 299 case 'd': … … 1004 1007 } 1005 1008 break; 1006 case 'A':1007 ExitFlag = 1;1008 if ((argptr >= argc) || (argv[argptr][0] == '-')){1009 ExitFlag =255;1010 cerr << "Missing source file for bonds in molecule: -A <bond sourcefile>" << endl;1011 } 1012 else{ 1013 cout << "Parsing bonds from " << argv[argptr] << "." << endl;1014 ifstream *input = new ifstream(argv[argptr]);1015 mol->CreateAdjacencyList2((ofstream *)&cout, input);1016 input->close(); 1017 } 1018 break; 1019 case 'N': 1020 ExitFlag = 1; 1021 if ((argptr >= argc) || (argv[argptr][0] == '-')){ 1022 ExitFlag = 255;1023 cerr << "Not enough or invalid arguments given for non-convex envelope: -o <tecplot output file>" << endl; 1024 } 1025 else { 1026 cout << Verbose(0) << "Evaluating npn-convex envelope.";1027 ofstream *output = new ofstream(argv[argptr], ios::trunc);1028 cout << Verbose(1) << "Storing tecplot data in " << argv[argptr] << "." << endl;1029 Find_non_convex_border((ofstream *)&cout, output, mol);1030 output->close();1031 delete(output);1032 argptr+=1;1033 }1034 break;1009 case 'A': 1010 ExitFlag = 1; 1011 if ((argptr >= argc) || (!IsValidNumber(argv[argptr])) || (argv[argptr][0] == '-')) { 1012 ExitFlag =255; 1013 cerr << "Missing source file for bonds in molecule: -A <bond sourcefile>" << endl; 1014 } else { 1015 cout << "Parsing bonds from " << argv[argptr] << "." << endl; 1016 ifstream *input = new ifstream(argv[argptr]); 1017 mol->CreateAdjacencyList2((ofstream *)&cout, input); 1018 input->close(); 1019 } 1020 break; 1021 case 'N': 1022 ExitFlag = 1; 1023 if ((argptr+1 >= argc) || (argv[argptr+1][0] == '-')){ 1024 ExitFlag = 255; 1025 cerr << "Not enough or invalid arguments given for non-convex envelope: -o <radius> <tecplot output file>" << endl; 1026 } else { 1027 cout << Verbose(0) << "Evaluating npn-convex envelope."; 1028 string TempName(argv[argptr+1]); 1029 TempName.append(".r3d"); 1030 ofstream *output = new ofstream(TempName.c_str(), ios::trunc); 1031 cout << Verbose(1) << "Using rolling ball of radius " << atof(argv[argptr]) << " and storing tecplot data in " << argv[argptr+1] << "." << endl; 1032 Find_non_convex_border((ofstream *)&cout, output, mol, argv[argptr+1], atof(argv[argptr])); 1033 output->close(); 1034 delete(output); 1035 argptr+=2; 1036 } 1037 break; 1035 1038 case 'T': 1036 1039 ExitFlag = 1; -
Property mode
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
