Changeset 978bcd
- Timestamp:
- Mar 1, 2010, 8:41:21 PM (16 years ago)
- Children:
- 075d08
- Parents:
- c0c33f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/builder.cpp
rc0c33f r978bcd 1419 1419 Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl; 1420 1420 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; 1421 Log() << Verbose(0) << "\t-F < dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl;1422 Log() << Verbose(0) << "\t-FF <MaxDistance> < dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl;1421 Log() << Verbose(0) << "\t-F <xyz of filler> <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl; 1422 Log() << Verbose(0) << "\t-FF <MaxDistance> <xyz of filler> <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl; 1423 1423 Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl; 1424 1424 Log() << Verbose(0) << "\t-h/-H/-?\tGive this help screen." << endl; … … 1750 1750 ofstream output(argv[argptr+2]); 1751 1751 ofstream binoutput(argv[argptr+3]); 1752 const double radius = 5.;1752 const double radius = 4.; 1753 1753 const double BinStart = atof(argv[argptr+4]); 1754 1754 const double BinEnd = atof(argv[argptr+5]); 1755 double LCWidth = 20.; 1756 if (BinEnd > 0) { 1757 if (BinEnd > 2.*radius) 1758 LCWidth = BinEnd; 1759 else 1760 LCWidth = 2.*radius; 1761 } 1755 1762 1756 1763 // get the boundary … … 1772 1779 (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true; 1773 1780 } 1774 LCList = new LinkedCell(Boundary, 2.*radius);1781 LCList = new LinkedCell(Boundary, LCWidth); 1775 1782 element *elemental = periode->FindElement((const int) atoi(argv[argptr+1])); 1776 1783 FindNonConvexBorder(Boundary, TesselStruct, LCList, radius, NULL); 1777 int ranges[NDIM] = {1,1,1};1778 CorrelationToSurfaceMap *surfacemap = PeriodicCorrelationToSurface( molecules, elemental, TesselStruct, LCList, ranges );1784 //int ranges[NDIM] = {1,1,1}; 1785 CorrelationToSurfaceMap *surfacemap = CorrelationToSurface( molecules, elemental, TesselStruct, LCList); // for Periodic..(): ..., ranges ); 1779 1786 OutputCorrelationToSurface(&output, surfacemap); 1787 // check whether radius was appropriate 1788 { 1789 double start; double end; 1790 GetMinMax( surfacemap, start, end); 1791 if (LCWidth < end) 1792 eLog() << Verbose(1) << "Linked Cell width is smaller than the found range of values! Bins can only be correct up to: " << radius << "." << endl; 1793 } 1780 1794 BinPairMap *binmap = BinData( surfacemap, 0.5, BinStart, BinEnd ); 1781 1795 OutputCorrelation ( &binoutput, binmap ); … … 1824 1838 Log() << Verbose(0) << "Filling with maximum layer distance of " << MaxDistance << "." << endl; 1825 1839 } 1826 if ( argptr+6 >=argc) {1840 if ((argptr+7 >=argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3])) || (!IsValidNumber(argv[argptr+4])) || (!IsValidNumber(argv[argptr+5])) || (!IsValidNumber(argv[argptr+6])) || (!IsValidNumber(argv[argptr+7]))) { 1827 1841 ExitFlag = 255; 1828 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;1842 eLog() << Verbose(0) << "Not enough or invalid arguments given for filling box with water: -F <xyz of filler> <dist_x> <dist_y> <dist_z> <boundary> <randatom> <randmol> <DoRotate>" << endl; 1829 1843 performCriticalExit(); 1830 1844 } else { … … 1833 1847 // construct water molecule 1834 1848 molecule *filler = new molecule(periode); 1849 if (!filler->AddXYZFile(argv[argptr])) { 1850 eLog() << Verbose(0) << "Could not parse filler molecule from " << argv[argptr] << "." << endl; 1851 } 1852 filler->SetNameFromFilename(argv[argptr]); 1853 configuration.BG->ConstructBondGraph(filler); 1835 1854 molecule *Filling = NULL; 1836 atom *second = NULL, *third = NULL;1837 // first = new atom();1838 // first->type = periode->FindElement(5);1839 // first->x.Zero();1840 // filler->AddAtom(first);1841 first = new atom();1842 first->type = periode->FindElement(1);1843 first->x.Init(0.441, -0.143, 0.);1844 filler->AddAtom(first);1845 second = new atom();1846 second->type = periode->FindElement(1);1847 second->x.Init(-0.464, 1.137, 0.0);1848 filler->AddAtom(second);1849 third = new atom();1850 third->type = periode->FindElement(8);1851 third->x.Init(-0.464, 0.177, 0.);1852 filler->AddAtom(third);1853 filler->AddBond(first, third, 1);1854 filler->AddBond(second, third, 1);1855 1855 // call routine 1856 1856 double distance[NDIM]; 1857 1857 for (int i=0;i<NDIM;i++) 1858 distance[i] = atof(argv[argptr+i ]);1859 Filling = FillBoxWithMolecule(molecules, filler, configuration, MaxDistance, distance, atof(argv[argptr+ 3]), atof(argv[argptr+4]), atof(argv[argptr+5]), atoi(argv[argptr+6]));1858 distance[i] = atof(argv[argptr+i+1]); 1859 Filling = FillBoxWithMolecule(molecules, filler, configuration, MaxDistance, distance, atof(argv[argptr+4]), atof(argv[argptr+5]), atof(argv[argptr+6]), atoi(argv[argptr+7])); 1860 1860 if (Filling != NULL) { 1861 1861 Filling->ActiveFlag = false;
Note:
See TracChangeset
for help on using the changeset viewer.