Changeset 09048c
- Timestamp:
- Oct 17, 2009, 4:54:46 PM (15 years ago)
- 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:
- 44a59b
- Parents:
- ad8b0d
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/analysis_correlation.hpp
rad8b0d r09048c 114 114 end = BinEnd; 115 115 for (double runner = start; runner <= end; runner += BinWidth) 116 outmap->insert( pair<double, int> (runner, 0 .) );116 outmap->insert( pair<double, int> (runner, 0) ); 117 117 } 118 118 -
src/builder.cpp
rad8b0d r09048c 1507 1507 case 'a': 1508 1508 if (ExitFlag == 0) ExitFlag = 1; 1509 if ((argptr >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr+1])) ) {1509 if ((argptr >= argc) || (argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) || (!IsValidNumber(argv[argptr+3]))) { 1510 1510 ExitFlag = 255; 1511 1511 cerr << "Not enough or invalid arguments for adding atom: -a <element> <x> <y> <z>" << endl; … … 1579 1579 case 'C': 1580 1580 if (ExitFlag == 0) ExitFlag = 1; 1581 if ((argptr+ 1 >= argc) || (argv[argptr+1][0] == '-') || (argv[argptr+2][0] == '-')) {1581 if ((argptr+2 >= argc) || (argv[argptr][0] == '-') || (argv[argptr+1][0] == '-') || (argv[argptr+2][0] == '-')) { 1582 1582 ExitFlag = 255; 1583 cerr << "Not enough or invalid arguments given for pair correlation analysis: -C < output> <bin output>" << endl;1583 cerr << "Not enough or invalid arguments given for pair correlation analysis: -C <boundary conf> <output> <bin output>" << endl; 1584 1584 } else { 1585 1585 SaveFlag = false; 1586 ofstream output(argv[argptr]); 1587 ofstream binoutput(argv[argptr+1]); 1588 class Tesselation T; 1586 ofstream output(argv[argptr+1]); 1587 ofstream binoutput(argv[argptr+2]); 1589 1588 const double radius = 5.; 1590 LinkedCell LCList(mol, 2.*radius); 1589 1590 // get the boundary 1591 class molecule *Boundary = new molecule(periode); 1592 struct ConfigFileBuffer *FileBuffer = NULL; 1593 PrepareFileBuffer(argv[argptr], FileBuffer); 1594 LoadMolecule(Boundary, FileBuffer, periode, false); 1595 LinkedCell LCList(Boundary, 2.*radius); 1591 1596 element *oxygen = periode->FindElement(8); 1592 FindNonConvexBorder((ofstream *)&cout, mol, &LCList, radius, NULL); 1593 CorrelationToSurfaceMap *surfacemap = CorrelationToSurface( (ofstream *)&cout, mol, oxygen, mol->TesselStruct, &LCList ); 1597 FindNonConvexBorder((ofstream *)&cout, Boundary, &LCList, radius, NULL); 1598 1599 CorrelationToSurfaceMap *surfacemap = CorrelationToSurface( (ofstream *)&cout, mol, oxygen, Boundary->TesselStruct, &LCList ); 1594 1600 BinPairMap *binmap = BinData( (ofstream *)&cout, surfacemap, 0.5, 0., 0. ); 1595 1601 OutputCorrelation ( &binoutput, binmap ); 1596 1602 output.close(); 1597 1603 binoutput.close(); 1598 argptr+=2; 1604 delete(FileBuffer); 1605 delete(Boundary); 1606 argptr+=3; 1599 1607 } 1600 1608 break; … … 1759 1767 case 't': 1760 1768 if (ExitFlag == 0) ExitFlag = 1; 1761 if ((argptr+2 >= argc) || ( argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {1769 if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) { 1762 1770 ExitFlag = 255; 1763 1771 cerr << "Not enough or invalid arguments given for translation: -t <x> <y> <z>" << endl; … … 1774 1782 case 'T': 1775 1783 if (ExitFlag == 0) ExitFlag = 1; 1776 if ((argptr+2 >= argc) || ( argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {1784 if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) { 1777 1785 ExitFlag = 255; 1778 1786 cerr << "Not enough or invalid arguments given for periodic translation: -T <x> <y> <z>" << endl; … … 1789 1797 case 's': 1790 1798 if (ExitFlag == 0) ExitFlag = 1; 1791 if ((argptr >= argc) || ( argv[argptr][0] == '-') || (!IsValidNumber(argv[argptr])) ) {1799 if ((argptr >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) { 1792 1800 ExitFlag = 255; 1793 cerr << "Not enough or invalid arguments given for scaling: -s <factor /[factor_x]> [factor_y] [factor_z]" << endl;1801 cerr << "Not enough or invalid arguments given for scaling: -s <factor_x> [factor_y] [factor_z]" << endl; 1794 1802 } else { 1795 1803 SaveFlag = true; … … 1798 1806 factor = new double[NDIM]; 1799 1807 factor[0] = atof(argv[argptr]); 1800 if ((argptr < argc) && (IsValidNumber(argv[argptr]))) 1801 argptr++; 1802 factor[1] = atof(argv[argptr]); 1803 if ((argptr < argc) && (IsValidNumber(argv[argptr]))) 1804 argptr++; 1805 factor[2] = atof(argv[argptr]); 1808 factor[1] = atof(argv[argptr+1]); 1809 factor[2] = atof(argv[argptr+2]); 1806 1810 mol->Scale(&factor); 1807 1811 for (int i=0;i<NDIM;i++) { … … 1811 1815 } 1812 1816 delete[](factor); 1813 argptr+= 1;1817 argptr+=3; 1814 1818 } 1815 1819 break;
Note:
See TracChangeset
for help on using the changeset viewer.