Changeset b84ab4 for molecuilder/src/builder.cpp
- Timestamp:
- Oct 30, 2009, 3:49:38 PM (16 years ago)
- Children:
- 245826
- Parents:
- 5f697c
- git-author:
- Frederik Heber <heber@…> (10/30/09 15:33:51)
- git-committer:
- Frederik Heber <heber@…> (10/30/09 15:49:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/builder.cpp
r5f697c rb84ab4 1357 1357 int argptr; 1358 1358 molecule *mol = NULL; 1359 string BondGraphFileName(""); 1359 1360 strncpy(configuration.databasepath, LocalPath, MAXSTRINGSIZE-1); 1360 1361 … … 1384 1385 cout << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl; 1385 1386 cout << "\t-f/F <dist> <order>\tFragments the molecule in BOSSANOVA manner (with/out rings compressed) and stores config files in same dir as config (return code 0 - fragmented, 2 - no fragmentation necessary)." << endl; 1387 cout << "\t-g <file>\tParses a bond length table from the given file." << endl; 1386 1388 cout << "\t-h/-H/-?\tGive this help screen." << endl; 1387 1389 cout << "\t-L <step0> <step1> <prefix>\tStore a linear interpolation between two configurations <step0> and <step1> into single config files with prefix <prefix> and as Trajectories into the current config file." << endl; … … 1420 1422 } 1421 1423 break; 1424 case 'g': 1425 if ((argptr >= argc) || (argv[argptr][0] == '-')) { 1426 cerr << "Not enough or invalid arguments for specifying bond length table: -g <table file>" << endl; 1427 } else { 1428 BondGraphFileName = argv[argptr]; 1429 cout << "Using " << BondGraphFileName << " as bond length table." << endl; 1430 argptr+=1; 1431 } 1432 break; 1422 1433 case 'n': 1423 1434 cout << "I won't parse trajectories." << endl; … … 1432 1443 } while (argptr < argc); 1433 1444 1434 // 2. Parse the element database1445 // 3a. Parse the element database 1435 1446 if (periode->LoadPeriodentafel(configuration.databasepath)) { 1436 1447 cout << Verbose(0) << "Element list loaded successfully." << endl; … … 1440 1451 return 1; 1441 1452 } 1442 // 3 . Find config file name and parse if possible1453 // 3b. Find config file name and parse if possible 1443 1454 if (argv[1][0] != '-') { 1444 1455 // simply create a new molecule, wherein the config file is loaded and the manipulation takes place … … 1483 1494 } else 1484 1495 configPresent = absent; 1496 // 3c. parse the bond graph file if given 1497 configuration.BG = new BondGraph(configuration.GetIsAngstroem()); 1498 if (configuration.BG->LoadBondLengthTable((ofstream *)&cout, BondGraphFileName)) { 1499 cout << Verbose(0) << "Bond length table loaded successfully." << endl; 1500 } else { 1501 cout << Verbose(0) << "Bond length table loading failed." << endl; 1502 return 1; 1503 } 1485 1504 // 4. parse again through options, now for those depending on elements db and config presence 1486 1505 argptr = 1;
Note:
See TracChangeset
for help on using the changeset viewer.