Changeset b74f7d


Ignore:
Timestamp:
Mar 1, 2010, 8:41:21 PM (15 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
30d9e7
Parents:
821907
Message:

FIX: ParseCommandLineOptions - case 'C' used wrong LC width, case 'F' nows parses filler from file.

ParseCommandLineOptions:

  • case 'C': Linked Cell width was set to fixed double of radius and was hence uncorrelated to the BinWidth. This is bad for subsequent DistanceToSurface() searches which use LC.
  • case 'F': Filler molecules was encoded by hand so far, is now parsed from xyz file and the bond structure created by BondGraph.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/builder.cpp

    r821907 rb74f7d  
    14191419            Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl;
    14201420            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;
    14231423            Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl;
    14241424            Log() << Verbose(0) << "\t-h/-H/-?\tGive this help screen." << endl;
     
    17501750                        ofstream output(argv[argptr+2]);
    17511751                        ofstream binoutput(argv[argptr+3]);
    1752                         const double radius = 5.;
     1752                        const double radius = 4.;
    17531753                        const double BinStart = atof(argv[argptr+4]);
    17541754                        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                        }
    17551762
    17561763                        // get the boundary
     
    17721779                          (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
    17731780                        }
    1774                         LCList = new LinkedCell(Boundary, 2.*radius);
     1781                        LCList = new LinkedCell(Boundary, LCWidth);
    17751782                        element *elemental = periode->FindElement((const int) atoi(argv[argptr+1]));
    17761783                        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 );
    17791786                        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                        }
    17801794                        BinPairMap *binmap = BinData( surfacemap, 0.5, BinStart, BinEnd );
    17811795                        OutputCorrelation ( &binoutput, binmap );
     
    18241838                Log() << Verbose(0) << "Filling with maximum layer distance of " << MaxDistance << "." << endl;
    18251839              }
    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]))) {
    18271841                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;
    18291843                performCriticalExit();
    18301844              } else {
     
    18331847                // construct water molecule
    18341848                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);
    18351854                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);
    18551855                // call routine
    18561856                double distance[NDIM];
    18571857                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]));
    18601860                if (Filling != NULL) {
    18611861                  Filling->ActiveFlag = false;
Note: See TracChangeset for help on using the changeset viewer.