Changes in molecuilder/src/builder.cpp [ef87ee:1aa2a5]
- File:
-
- 1 edited
-
molecuilder/src/builder.cpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/builder.cpp
ref87ee r1aa2a5 49 49 50 50 using namespace std; 51 52 #include <cstring> 51 53 52 54 #include "analysis_correlation.hpp" … … 1410 1412 Log() << Verbose(0) << "\t-B xx xy xz yy yz zz\tBound atoms by domain with given symmetric matrix of (xx,xy,xz,yy,yz,zz)." << endl; 1411 1413 Log() << Verbose(0) << "\t-c x1 x2 x3\tCenter atoms in domain with a minimum distance to boundary of (x1,x2,x3)." << endl; 1412 Log() << Verbose(0) << "\t-C \tPair Correlation analysis." << endl;1414 Log() << Verbose(0) << "\t-C <Z> <output> <bin output>\tPair Correlation analysis." << endl; 1413 1415 Log() << Verbose(0) << "\t-d x1 x2 x3\tDuplicate cell along each axis by given factor." << endl; 1414 1416 Log() << Verbose(0) << "\t-D <bond distance>\tDepth-First-Search Analysis of the molecule, giving cycles and tree/back edges." << endl; 1415 1417 Log() << Verbose(0) << "\t-e <file>\tSets the databases path to be parsed (default: ./)." << endl; 1416 1418 Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl; 1417 Log() << Verbose(0) << "\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; 1419 Log() << Verbose(0) << "\t-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; 1420 Log() << Verbose(0) << "\t-F <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl; 1418 1421 Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl; 1419 1422 Log() << Verbose(0) << "\t-h/-H/-?\tGive this help screen." << endl; 1423 Log() << Verbose(0) << "\t-I\t Dissect current system of molecules into a set of disconnected (subgraphs of) molecules." << endl; 1420 1424 Log() << Verbose(0) << "\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; 1421 1425 Log() << Verbose(0) << "\t-m <0/1>\tCalculate (0)/ Align in(1) PAS with greatest EV along z axis." << endl; … … 1575 1579 else { 1576 1580 Log() << Verbose(2) << "File found and parsed." << endl; 1577 // @TODO rather do the dissection afterwards1578 // mol->SetNameFromFilename(argv[argptr]);1579 // molecules->ListOfMolecules.remove(mol);1580 // molecules->DissectMoleculeIntoConnectedSubgraphs(mol,&configuration);1581 // delete(mol);1582 // if (molecules->ListOfMolecules.size() != 0) {1583 // for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)1584 // if ((*ListRunner)->ActiveFlag) {1585 // mol = *ListRunner;1586 // break;1587 // }1588 // }1589 1581 configPresent = present; 1590 1582 } … … 1665 1657 //argptr+=1; 1666 1658 break; 1659 case 'I': 1660 Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl; 1661 // @TODO rather do the dissection afterwards 1662 molecules->DissectMoleculeIntoConnectedSubgraphs(mol,&configuration); 1663 mol = NULL; 1664 if (molecules->ListOfMolecules.size() != 0) { 1665 for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++) 1666 if ((*ListRunner)->ActiveFlag) { 1667 mol = *ListRunner; 1668 break; 1669 } 1670 } 1671 if (mol == NULL) { 1672 mol = *(molecules->ListOfMolecules.begin()); 1673 mol->ActiveFlag = true; 1674 } 1675 break; 1667 1676 case 'C': 1668 1677 if (ExitFlag == 0) ExitFlag = 1; … … 1672 1681 performCriticalExit(); 1673 1682 } else { 1674 SaveFlag = false;1675 1683 ofstream output(argv[argptr+1]); 1676 1684 ofstream binoutput(argv[argptr+2]); … … 1692 1700 counter = 0; 1693 1701 for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) { 1694 Actives[counter ] = (*BigFinder)->ActiveFlag;1702 Actives[counter++] = (*BigFinder)->ActiveFlag; 1695 1703 (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true; 1696 1704 } … … 1705 1713 binoutput.close(); 1706 1714 for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) 1707 (*BigFinder)->ActiveFlag = Actives[counter ];1715 (*BigFinder)->ActiveFlag = Actives[counter++]; 1708 1716 Free(&Actives); 1709 1717 delete(LCList); … … 1728 1736 case 'F': 1729 1737 if (ExitFlag == 0) ExitFlag = 1; 1730 if (argptr+ 5>=argc) {1738 if (argptr+6 >=argc) { 1731 1739 ExitFlag = 255; 1732 eLog() << Verbose(0) << "Not enough or invalid arguments given for filling box with water: -F <dist_x> <dist_y> <dist_z> < randatom> <randmol> <DoRotate>" << endl;1740 eLog() << Verbose(0) << "Not enough or invalid arguments given for filling box with water: -F <dist_x> <dist_y> <dist_z> <boundary> <randatom> <randmol> <DoRotate>" << endl; 1733 1741 performCriticalExit(); 1734 1742 } else { … … 1738 1746 molecule *filler = new molecule(periode);; 1739 1747 molecule *Filling = NULL; 1740 atom *second = NULL, *third = NULL;1748 // atom *second = NULL, *third = NULL; 1741 1749 first = new atom(); 1742 first->type = periode->FindElement( 1);1743 first->x. Init(0.441, -0.143, 0.);1750 first->type = periode->FindElement(5); 1751 first->x.Zero(); 1744 1752 filler->AddAtom(first); 1745 second = new atom(); 1746 second->type = periode->FindElement(1); 1747 second->x.Init(-0.464, 1.137, 0.0); 1748 filler->AddAtom(second); 1749 third = new atom(); 1750 third->type = periode->FindElement(8); 1751 third->x.Init(-0.464, 0.177, 0.); 1752 filler->AddAtom(third); 1753 filler->AddBond(first, third, 1); 1754 filler->AddBond(second, third, 1); 1753 // first = new atom(); 1754 // first->type = periode->FindElement(1); 1755 // first->x.Init(0.441, -0.143, 0.); 1756 // filler->AddAtom(first); 1757 // second = new atom(); 1758 // second->type = periode->FindElement(1); 1759 // second->x.Init(-0.464, 1.137, 0.0); 1760 // filler->AddAtom(second); 1761 // third = new atom(); 1762 // third->type = periode->FindElement(8); 1763 // third->x.Init(-0.464, 0.177, 0.); 1764 // filler->AddAtom(third); 1765 // filler->AddBond(first, third, 1); 1766 // filler->AddBond(second, third, 1); 1755 1767 // call routine 1756 1768 double distance[NDIM]; 1757 1769 for (int i=0;i<NDIM;i++) 1758 1770 distance[i] = atof(argv[argptr+i]); 1759 Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), ato i(argv[argptr+5]));1771 Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atof(argv[argptr+5]), atoi(argv[argptr+6])); 1760 1772 if (Filling != NULL) { 1773 Filling->ActiveFlag = false; 1761 1774 molecules->insert(Filling); 1762 1775 } … … 2107 2120 if (volume != -1) 2108 2121 ExitFlag = 255; 2109 eLog() << Verbose(0) << "Not enough arguments given for suspension: -u <density>" << endl;2122 eLog() << Verbose(0) << "Not enough or invalid arguments given for suspension: -u <density>" << endl; 2110 2123 performCriticalExit(); 2111 2124 } else {
Note:
See TracChangeset
for help on using the changeset viewer.
