Changeset 0e348e for molecuilder/src
- Timestamp:
- May 16, 2008, 1:35:43 PM (17 years ago)
- Children:
- e9c14d
- Parents:
- cc6dfb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/builder.cpp
rcc6dfb r0e348e 717 717 char *ConfigFileName = NULL; 718 718 char *ElementsFileName = NULL; 719 int flag = 0;719 int ExitFlag = 0; 720 720 int Z; 721 721 int j, axis, count, faktor; … … 746 746 cout << "\t-c x1 x2 x3\tCenter atoms in domain with a minimum distance to boundary of (x1,x2,x3)." << endl; 747 747 cout << "\t-e <file>\tSets the element database to be parsed from this file (default: elements.db in same dir as " << argv[0] << ")." << endl; 748 cout << "\t- e<dist> <order>\tFragments the molecule in BOSSANOVA manner and stores config files in same dir as config." << endl;748 cout << "\t-f <dist> <order>\tFragments the molecule in BOSSANOVA manner and stores config files in same dir as config." << endl; 749 749 cout << "\t-h/-H/-?\tGive this help screen." << endl; 750 750 cout << "\t-p <file>\tParse given xyz file and create raw config file from it." << endl; … … 832 832 switch(argv[argptr-1][1]) { 833 833 case 'p': 834 flag = 1;834 ExitFlag = 1; 835 835 cout << Verbose(1) << "Parsing xyz file for new atoms." << endl; 836 836 if (!mol->AddXYZFile(argv[argptr++])) … … 848 848 switch(argv[argptr-1][1]) { 849 849 case 't': 850 flag = 1;850 ExitFlag = 1; 851 851 cout << Verbose(1) << "Translating all ions to new origin." << endl; 852 852 for (int i=0;i<3;i++) … … 856 856 break; 857 857 case 'a': 858 flag = 1;858 ExitFlag = 1; 859 859 cout << Verbose(1) << "Adding new atom." << endl; 860 860 first = new atom; … … 873 873 break; 874 874 case 's': 875 flag = 1;875 ExitFlag = 1; 876 876 j = -1; 877 877 cout << Verbose(1) << "Scaling all ion positions by factor." << endl; … … 894 894 break; 895 895 case 'c': 896 flag = 1;896 ExitFlag = 1; 897 897 j = -1; 898 898 cout << Verbose(1) << "Centering atoms in config file within given additional boundary." << endl; … … 911 911 break; 912 912 case 'r': 913 flag = 1;913 ExitFlag = 1; 914 914 cout << Verbose(1) << "Converting config file from supposed old to new syntax." << endl; 915 915 break; 916 916 case 'f': 917 if ( flag ==0) flag = 2; // only set if not already by other command line switch917 if (ExitFlag ==0) ExitFlag = 2; // only set if not already by other command line switch 918 918 cout << "Fragmenting molecule with bond distance " << argv[argptr] << " angstroem, order of " << argv[argptr+1] << "." << endl; 919 919 if (argc >= argptr+2) { … … 940 940 } else argptr++; 941 941 } while (argptr < argc); 942 if ( flag == 1) // 1 means save and exit942 if (ExitFlag == 1) // 1 means save and exit 943 943 SaveConfig(ConfigFileName, &configuration, periode, mol); 944 if ( flag >1) { // 2 means just exit944 if (ExitFlag >= 1) { // 2 means just exit 945 945 delete(mol); 946 946 delete(periode); … … 1102 1102 1103 1103 case 'c': // unit scaling of the metric 1104 cout << Verbose(0) << "Angstroem -> Bohrradius: 1.8897261\t\tBohrradius -> Angstroem: 0.52917721" << endl; 1104 1105 cout << Verbose(0) << "Enter three factors: "; 1105 1106 factor = (double *) Malloc(sizeof(double)*NDIM, "main: *factor");
Note:
See TracChangeset
for help on using the changeset viewer.