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