Changeset 3930eb for src/builder.cpp


Ignore:
Timestamp:
Dec 19, 2009, 7:31:34 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:
71b20e, bd61b41
Parents:
1cf5df
git-author:
Frederik Heber <heber@…> (12/19/09 19:29:02)
git-committer:
Frederik Heber <heber@…> (12/19/09 19:31:34)
Message:

Smaller fixes.

  • analysis_correlation.cpp: Info objects created at start of each function for debugging.
  • ParseCommandLineOptions(): case 'I' dissection added, some stuff was unexplained
  • molecule::CenterOrigin() - starting at start not next now, which left out first!

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/builder.cpp

    r1cf5df r3930eb  
    14101410            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;
    14111411            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;
     1412            Log() << Verbose(0) << "\t-C <Z> <output> <bin output>\tPair Correlation analysis." << endl;
    14131413            Log() << Verbose(0) << "\t-d x1 x2 x3\tDuplicate cell along each axis by given factor." << endl;
    14141414            Log() << Verbose(0) << "\t-D <bond distance>\tDepth-First-Search Analysis of the molecule, giving cycles and tree/back edges." << endl;
     
    14161416            Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl;
    14171417            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;
     1418            Log() << Verbose(0) << "\t-F\tFilling Box with water molecules." << endl;
    14181419            Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl;
    14191420            Log() << Verbose(0) << "\t-h/-H/-?\tGive this help screen." << endl;
     1421            Log() << Verbose(0) << "\t-I\t Dissect current system of molecules into a set of disconnected (subgraphs of) molecules." << endl;
    14201422            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;
    14211423            Log() << Verbose(0) << "\t-m <0/1>\tCalculate (0)/ Align in(1) PAS with greatest EV along z axis." << endl;
     
    15751577                else {
    15761578                  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 //                  }
    15891579                  configPresent = present;
    15901580                }
     
    16651655              //argptr+=1;
    16661656              break;
     1657            case 'I':
     1658              Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl;
     1659              // @TODO rather do the dissection afterwards
     1660              molecules->DissectMoleculeIntoConnectedSubgraphs(mol,&configuration);
     1661              mol = NULL;
     1662              if (molecules->ListOfMolecules.size() != 0) {
     1663                for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
     1664                  if ((*ListRunner)->ActiveFlag) {
     1665                    mol = *ListRunner;
     1666                    break;
     1667                  }
     1668              }
     1669              if (mol == NULL) {
     1670                mol = *(molecules->ListOfMolecules.begin());
     1671                mol->ActiveFlag = true;
     1672              }
     1673              break;
    16671674            case 'C':
    16681675              if (ExitFlag == 0) ExitFlag = 1;
     
    16721679                performCriticalExit();
    16731680              } else {
    1674                 SaveFlag = false;
    16751681                ofstream output(argv[argptr+1]);
    16761682                ofstream binoutput(argv[argptr+2]);
     
    16921698                counter = 0;
    16931699                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
    1694                   Actives[counter] = (*BigFinder)->ActiveFlag;
     1700                  Actives[counter++] = (*BigFinder)->ActiveFlag;
    16951701                  (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
    16961702                }
     
    17051711                binoutput.close();
    17061712                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++)
    1707                   (*BigFinder)->ActiveFlag = Actives[counter];
     1713                  (*BigFinder)->ActiveFlag = Actives[counter++];
    17081714                Free(&Actives);
    17091715                delete(LCList);
     
    17281734            case 'F':
    17291735              if (ExitFlag == 0) ExitFlag = 1;
    1730               if (argptr+5 >=argc) {
     1736              if (argptr+6 >=argc) {
    17311737                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;
     1738                eLog() << Verbose(0) << "Not enough or invalid arguments given for filling box with water: -F <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>" << endl;
    17331739                performCriticalExit();
    17341740              } else {
     
    17401746                atom *second = NULL, *third = NULL;
    17411747                first = new atom();
    1742                 first->type = periode->FindElement(1);
    1743                 first->x.Init(0.441, -0.143, 0.);
     1748                first->type = periode->FindElement(5);
     1749                first->x.Zero();
    17441750                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);
     1751//                first = new atom();
     1752//                first->type = periode->FindElement(1);
     1753//                first->x.Init(0.441, -0.143, 0.);
     1754//                filler->AddAtom(first);
     1755//                second = new atom();
     1756//                second->type = periode->FindElement(1);
     1757//                second->x.Init(-0.464, 1.137, 0.0);
     1758//                filler->AddAtom(second);
     1759//                third = new atom();
     1760//                third->type = periode->FindElement(8);
     1761//                third->x.Init(-0.464, 0.177, 0.);
     1762//                filler->AddAtom(third);
     1763//                filler->AddBond(first, third, 1);
     1764//                filler->AddBond(second, third, 1);
    17551765                // call routine
    17561766                double distance[NDIM];
    17571767                for (int i=0;i<NDIM;i++)
    17581768                  distance[i] = atof(argv[argptr+i]);
    1759                 Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atoi(argv[argptr+5]));
     1769                Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atof(argv[argptr+5]), atoi(argv[argptr+6]));
    17601770                if (Filling != NULL) {
     1771                  Filling->ActiveFlag = false;
    17611772                  molecules->insert(Filling);
    17621773                }
Note: See TracChangeset for help on using the changeset viewer.