Changeset 71b20e for src/boundary.cpp
- Timestamp:
- Dec 19, 2009, 7:32:24 PM (16 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, Candidate_v1.7.0, 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:
- c15ca2
- Parents:
- 3930eb
- File:
-
- 1 edited
-
src/boundary.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
r3930eb r71b20e 654 654 * \param *out output stream for debugging 655 655 * \param *mol molecule with atoms and bonds 656 * \param * &TesselStruct Tesselation with boundary triangles656 * \param *TesselStruct Tesselation with boundary triangles 657 657 * \param *filename prefix of filename 658 658 * \param *extraSuffix intermediate suffix 659 659 */ 660 void StoreTrianglesinFile(const molecule * const mol, const Tesselation * &TesselStruct, const char *filename, const char *extraSuffix)660 void StoreTrianglesinFile(const molecule * const mol, const Tesselation * const TesselStruct, const char *filename, const char *extraSuffix) 661 661 { 662 662 Info FunctionInfo(__func__); … … 789 789 * \param configuration contains box dimensions 790 790 * \param distance[NDIM] distance between filling molecules in each direction 791 * \param epsilon distance to surface which is not filled 791 792 * \param RandAtomDisplacement maximum distance for random displacement per atom 792 793 * \param RandMolDisplacement maximum distance for random displacement per filler molecule … … 794 795 * \return *mol pointer to new molecule with filled atoms 795 796 */ 796 molecule * FillBoxWithMolecule(MoleculeListClass *List, molecule *filler, config &configuration, double distance[NDIM], double RandomAtomDisplacement, double RandomMolDisplacement,bool DoRandomRotation)797 molecule * FillBoxWithMolecule(MoleculeListClass *List, molecule *filler, config &configuration, const double distance[NDIM], const double epsilon, const double RandomAtomDisplacement, const double RandomMolDisplacement, const bool DoRandomRotation) 797 798 { 798 799 Info FunctionInfo(__func__); … … 817 818 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) { 818 819 Log() << Verbose(1) << "Pre-creating linked cell lists for molecule " << *ListRunner << "." << endl; 819 LCList[i] = new LinkedCell((*ListRunner), 5.); // get linked cell list 820 if (TesselStruct[i] == NULL) { 821 Log() << Verbose(1) << "Pre-creating tesselation for molecule " << *ListRunner << "." << endl; 822 FindNonConvexBorder((*ListRunner), TesselStruct[i], (const LinkedCell *&)LCList[i], 5., NULL); 823 } 820 LCList[i] = new LinkedCell((*ListRunner), 10.); // get linked cell list 821 Log() << Verbose(1) << "Pre-creating tesselation for molecule " << *ListRunner << "." << endl; 822 TesselStruct[i] = NULL; 823 FindNonConvexBorder((*ListRunner), TesselStruct[i], (const LinkedCell *&)LCList[i], 5., NULL); 824 824 i++; 825 825 } … … 835 835 FillerDistance.Init(distance[0], distance[1], distance[2]); 836 836 FillerDistance.InverseMatrixMultiplication(M); 837 Log() << Verbose(1) << "INFO: Grid steps are "; 838 for(int i=0;i<NDIM;i++) { 837 for(int i=0;i<NDIM;i++) 839 838 N[i] = (int) ceil(1./FillerDistance.x[i]); 840 Log() << Verbose(1) << N[i]; 841 if (i != NDIM-1) 842 Log() << Verbose(1)<< ", "; 843 else 844 Log() << Verbose(1) << "." << endl; 845 } 839 Log() << Verbose(1) << "INFO: Grid steps are " << N[0] << ", " << N[1] << ", " << N[2] << "." << endl; 846 840 847 841 // go over [0,1]^3 filler grid … … 862 856 FillIt = false; 863 857 } else { 864 FillIt = FillIt && (!TesselStruct[i]->IsInnerPoint(CurrentPosition, LCList[i])); 858 const bool FillResult = (!TesselStruct[i]->IsInnerPoint(CurrentPosition, LCList[i], epsilon)); 859 FillIt = FillIt && FillResult; 860 if (FillResult) { 861 Log() << Verbose(1) << "INFO: Position at " << CurrentPosition << " is outer point." << endl; 862 } else { 863 Log() << Verbose(1) << "INFO: Position at " << CurrentPosition << " is inner point." << endl; 864 } 865 865 i++; 866 866 } 867 867 } 868 868 869 if ( FillIt) {869 if (!FillIt) { 870 870 // fill in Filler 871 871 Log() << Verbose(2) << "Space at " << CurrentPosition << " is unoccupied by any molecule, filling in." << endl; … … 931 931 } 932 932 Free(&M); 933 934 // output to file 935 TesselStruct[0]->LastTriangle = NULL; 936 StoreTrianglesinFile(Filling, TesselStruct[0], "Tesselated", ".dat"); 937 933 938 for (size_t i=0;i<List->ListOfMolecules.size();i++) { 934 939 delete(LCList[i]);
Note:
See TracChangeset
for help on using the changeset viewer.
