Changeset f10b0c for src/Actions/MoleculeAction
- Timestamp:
- Jun 11, 2012, 9:53:19 AM (13 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:
- 95f965
- Parents:
- b9c69d
- git-author:
- Michael Ankele <ankele@…> (04/24/12 13:55:16)
- git-committer:
- Frederik Heber <heber@…> (06/11/12 09:53:19)
- Location:
- src/Actions/MoleculeAction
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/MoleculeAction/BondFileAction.cpp
rb9c69d rf10b0c 43 43 if(World::getInstance().countSelectedMolecules() == 1) { 44 44 mol = World::getInstance().beginMoleculeSelection()->second; 45 LOG(0, "STATUS: Parsing bonds from " << params.bondfile 46 << ", skipping " << params.skiplines << "lines"47 << ", adding " << params.id_offset << " to each id.");48 ifstream input(params.bondfile. string().c_str());45 LOG(0, "STATUS: Parsing bonds from " << params.bondfile.get() 46 << ", skipping " << params.skiplines.get() << "lines" 47 << ", adding " << params.id_offset.get() << " to each id."); 48 ifstream input(params.bondfile.get().string().c_str()); 49 49 World::AtomComposite Set = mol->getAtomSet(); 50 World::getInstance().getBondGraph()->CreateAdjacencyListFromDbondFile(Set, &input, params.skiplines , params.id_offset);50 World::getInstance().getBondGraph()->CreateAdjacencyListFromDbondFile(Set, &input, params.skiplines.get(), params.id_offset.get()); 51 51 input.close(); 52 52 mol->getBondCount(); -
src/Actions/MoleculeAction/ChangeNameAction.cpp
rb9c69d rf10b0c 40 40 mol = World::getInstance().beginMoleculeSelection()->second; 41 41 string oldName = mol->getName(); 42 mol->setName(params.name );42 mol->setName(params.name.get()); 43 43 return Action::state_ptr(new MoleculeChangeNameState(mol,params)); 44 44 } else … … 50 50 51 51 string newName = state->mol->getName(); 52 state->mol->setName(state->params.name );53 state->params.name = newName;52 state->mol->setName(state->params.name.get()); 53 state->params.name.set(newName); 54 54 55 55 return Action::state_ptr(_state); -
src/Actions/MoleculeAction/CopyAction.cpp
rb9c69d rf10b0c 43 43 molecule *copy = NULL; 44 44 45 copy = params.mol ->CopyMolecule();46 Vector *Center = params.mol ->DetermineCenterOfAll();45 copy = params.mol.get()->CopyMolecule(); 46 Vector *Center = params.mol.get()->DetermineCenterOfAll(); 47 47 *Center *= -1.; 48 *Center += params.position ;48 *Center += params.position.get(); 49 49 copy->Translate(Center); 50 50 delete(Center); … … 65 65 MoleculeCopyState *state = assert_cast<MoleculeCopyState*>(_state.get()); 66 66 67 molecule *copy = state->params.mol ->CopyMolecule();68 Vector *Center = state->params.mol ->DetermineCenterOfAll();67 molecule *copy = state->params.mol.get()->CopyMolecule(); 68 Vector *Center = state->params.mol.get()->DetermineCenterOfAll(); 69 69 *Center *= -1.; 70 *Center += state->params.position ;70 *Center += state->params.position.get(); 71 71 copy->Translate(Center); 72 72 delete(Center); -
src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp
rb9c69d rf10b0c 46 46 /** =========== define the function ====================== */ 47 47 Action::state_ptr MoleculeFillVoidWithMoleculeAction::performCall() { 48 if (!boost::filesystem::exists(params.fillername )) {49 ELOG(1, "File with filler molecule " << params.fillername << " does not exist!");48 if (!boost::filesystem::exists(params.fillername.get())) { 49 ELOG(1, "File with filler molecule " << params.fillername.get() << " does not exist!"); 50 50 return Action::failure; 51 51 } 52 52 53 53 LOG(1, "INFO: Filling Box with water molecules, " 54 << " minimum distance to molecules" << params.boundary 55 << ", random atom displacement " << params.RandAtomDisplacement 56 << ", random molecule displacement " << params.RandMoleculeDisplacement 57 << ", distances between fillers (" << params.distances [0] << "," << params.distances[1] << "," << params.distances[2]58 << "), MinDistance " << params.MinDistance 59 << ", DoRotate " << params.DoRotate << ".");54 << " minimum distance to molecules" << params.boundary.get() 55 << ", random atom displacement " << params.RandAtomDisplacement.get() 56 << ", random molecule displacement " << params.RandMoleculeDisplacement.get() 57 << ", distances between fillers (" << params.distances.get()[0] << "," << params.distances.get()[1] << "," << params.distances.get()[2] 58 << "), MinDistance " << params.MinDistance.get() 59 << ", DoRotate " << params.DoRotate.get() << "."); 60 60 // construct water molecule 61 61 std::vector<molecule *> presentmolecules = World::getInstance().getAllMolecules(); 62 62 // LOG(0, presentmolecules.size() << " molecules initially are present."); 63 std::string FilenameSuffix = params.fillername. string().substr(params.fillername.string().find_last_of('.')+1, params.fillername.string().length());63 std::string FilenameSuffix = params.fillername.get().string().substr(params.fillername.get().string().find_last_of('.')+1, params.fillername.get().string().length()); 64 64 ifstream input; 65 input.open(params.fillername. string().c_str());65 input.open(params.fillername.get().string().c_str()); 66 66 ParserTypes type = FormatParserStorage::getInstance().getTypeFromSuffix(FilenameSuffix); 67 67 FormatParserInterface &parser = FormatParserStorage::getInstance().get(type); … … 72 72 ASSERT(filler != NULL, 73 73 "MoleculeFillVoidWithMoleculeAction::performCall() - no last molecule found, nothing parsed?."); 74 filler->SetNameFromFilename(params.fillername. string().c_str());74 filler->SetNameFromFilename(params.fillername.get().string().c_str()); 75 75 World::AtomComposite Set = filler->getAtomSet(); 76 76 World::getInstance().getBondGraph()->CreateAdjacency(Set); … … 79 79 double distance[NDIM]; 80 80 for (int i=0;i<NDIM;i++) 81 distance[i] = params.distances [i];81 distance[i] = params.distances.get()[i]; 82 82 FillVoidWithMolecule( 83 83 filler, 84 84 *(World::getInstance().getConfig()), 85 85 distance, 86 params.boundary ,87 params.RandAtomDisplacement ,88 params.RandMoleculeDisplacement ,89 params.MinDistance ,90 params.DoRotate );86 params.boundary.get(), 87 params.RandAtomDisplacement.get(), 88 params.RandMoleculeDisplacement.get(), 89 params.MinDistance.get(), 90 params.DoRotate.get()); 91 91 92 92 // generate list of newly created molecules -
src/Actions/MoleculeAction/FillWithMoleculeAction.cpp
rb9c69d rf10b0c 46 46 47 47 LOG(1, "INFO: Filling Box with water molecules, " 48 << " minimum distance to molecules" << params.boundary 49 << ", random atom displacement " << params.RandAtomDisplacement 50 << ", random molecule displacement " << params.RandMoleculeDisplacement 51 << ", distances between fillers (" << params.distances [0] << "," << params.distances[1] << "," << params.distances[2]52 << "), MinDistance " << params.MaxDistance 53 << ", DoRotate " << params.DoRotate << ".");48 << " minimum distance to molecules" << params.boundary.get() 49 << ", random atom displacement " << params.RandAtomDisplacement.get() 50 << ", random molecule displacement " << params.RandMoleculeDisplacement.get() 51 << ", distances between fillers (" << params.distances.get()[0] << "," << params.distances.get()[1] << "," << params.distances.get()[2] 52 << "), MinDistance " << params.MaxDistance.get() 53 << ", DoRotate " << params.DoRotate.get() << "."); 54 54 // construct water molecule 55 55 std::vector<molecule *> presentmolecules = World::getInstance().getAllMolecules(); 56 56 // LOG(0, presentmolecules.size() << " molecules initially are present."); 57 std::string FilenameSuffix = params.fillername. string().substr(params.fillername.string().find_last_of('.')+1, params.fillername.string().length());57 std::string FilenameSuffix = params.fillername.get().string().substr(params.fillername.get().string().find_last_of('.')+1, params.fillername.get().string().length()); 58 58 ifstream input; 59 LOG(0, "STATUS: Loading filler molecule " << params.fillername. string().c_str()59 LOG(0, "STATUS: Loading filler molecule " << params.fillername.get().string().c_str() 60 60 << " of suffix " << FilenameSuffix << "."); 61 input.open(params.fillername. string().c_str());61 input.open(params.fillername.get().string().c_str()); 62 62 FormatParserStorage::getInstance().load(input, FilenameSuffix); 63 63 input.close(); … … 67 67 ASSERT(filler != NULL, 68 68 "MoleculeFillWithMoleculeAction::performCall() - no last molecule found, nothing parsed?."); 69 filler->SetNameFromFilename(params.fillername. string().c_str());69 filler->SetNameFromFilename(params.fillername.get().string().c_str()); 70 70 World::AtomComposite Set = filler->getAtomSet(); 71 71 LOG(1, "INFO: The filler molecules has " << Set.size() << " atoms."); … … 78 78 double distance[NDIM]; 79 79 for (int i=0;i<NDIM;i++) 80 distance[i] = params.distances [i];80 distance[i] = params.distances.get()[i]; 81 81 FillBoxWithMolecule( 82 82 World::getInstance().getMolecules(), 83 83 filler, *(World::getInstance().getConfig()), 84 params.MaxDistance ,84 params.MaxDistance.get(), 85 85 distance, 86 params.boundary ,87 params.RandAtomDisplacement ,88 params.RandMoleculeDisplacement ,89 params.DoRotate );86 params.boundary.get(), 87 params.RandAtomDisplacement.get(), 88 params.RandMoleculeDisplacement.get(), 89 params.DoRotate.get()); 90 90 for (molecule::iterator iter = filler->begin(); !filler->empty(); iter = filler->begin()) { 91 91 atom *Walker = *iter; -
src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp
rb9c69d rf10b0c 43 43 /** =========== define the function ====================== */ 44 44 Action::state_ptr MoleculeLinearInterpolationofTrajectoriesAction::performCall() { 45 LOG(0, "STATUS: Linear interpolation between configuration " << params.start << " and " << params.end<< "." << endl);46 ASSERT(params.end > params.start, "MoleculeLinearInterpolationofTrajectoriesAction() - start step greater than end step.");45 LOG(0, "STATUS: Linear interpolation between configuration " << params.start.get() << " and " << params.end.get() << "." << endl); 46 ASSERT(params.end.get() > params.start.get(), "MoleculeLinearInterpolationofTrajectoriesAction() - start step greater than end step."); 47 47 AtomSetMixin<std::vector<atom*> > set(World::getInstance().getSelectedAtoms()); 48 LinearInterpolationBetweenSteps<std::vector<atom*> > LinearInterpolate(set,(unsigned int)(params.interpolation_steps ));49 LinearInterpolate(params.start , params.end, params.IdMapping);48 LinearInterpolationBetweenSteps<std::vector<atom*> > LinearInterpolate(set,(unsigned int)(params.interpolation_steps.get())); 49 LinearInterpolate(params.start.get(), params.end.get(), params.IdMapping.get()); 50 50 LOG(0, "STATUS: done." << endl); 51 51 -
src/Actions/MoleculeAction/LoadAction.cpp
rb9c69d rf10b0c 44 44 Action::state_ptr MoleculeLoadAction::performCall() { 45 45 // parsing file if present 46 if (!boost::filesystem::exists(params.filename )) {47 LOG(1, "Specified input file " << params.filename << " not found.");46 if (!boost::filesystem::exists(params.filename.get())) { 47 LOG(1, "Specified input file " << params.filename.get() << " not found."); 48 48 return Action::failure; 49 49 } else { … … 53 53 std::string FilenameSuffix; 54 54 std::string FilenamePrefix; 55 if (params.filename. has_filename()) {55 if (params.filename.get().has_filename()) { 56 56 // get suffix 57 57 #if BOOST_VERSION >= 104600 58 FilenameSuffix = params.filename. extension().string().substr(1); // remove the prefixed "."59 FilenamePrefix = params.filename. stem().string();58 FilenameSuffix = params.filename.get().extension().string().substr(1); // remove the prefixed "." 59 FilenamePrefix = params.filename.get().stem().string(); 60 60 #else 61 FilenameSuffix = params.filename. extension().substr(1); // remove the prefixed "."62 FilenamePrefix = params.filename. stem();61 FilenameSuffix = params.filename.get().extension().substr(1); // remove the prefixed "." 62 FilenamePrefix = params.filename.get().stem(); 63 63 #endif 64 64 } else { … … 79 79 // parse the file 80 80 boost::filesystem::ifstream input; 81 input.open(params.filename );81 input.open(params.filename.get()); 82 82 FormatParserStorage::getInstance().load(input, FilenameSuffix); 83 83 input.close(); … … 125 125 // parse the file 126 126 boost::filesystem::ifstream input; 127 input.open(state->params.filename );127 input.open(state->params.filename.get()); 128 128 FormatParserStorage::getInstance().load(input, state->FilenameSuffix); 129 129 input.close(); -
src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.cpp
rb9c69d rf10b0c 48 48 BOOST_FOREACH(molecule *mol, selectedMolecules) { 49 49 // check whether Axis is valid 50 if (params.Axis. IsZero())50 if (params.Axis.get().IsZero()) 51 51 return Action::failure; 52 52 53 53 // convert from degrees to radian 54 params.angle *= M_PI/180.;54 params.angle.set(params.angle.get() * M_PI/180.); 55 55 56 56 // Creation Line that is the rotation axis 57 57 Vector *CenterOfGravity = mol->DetermineCenterOfGravity(); 58 58 LOG(0, "Center of gravity is " << *CenterOfGravity << "."); 59 Line RotationAxis(*CenterOfGravity, params.Axis );59 Line RotationAxis(*CenterOfGravity, params.Axis.get()); 60 60 delete(CenterOfGravity); 61 LOG(0, "Rotate " << mol->getName() << " around self by " << params.angle << " radian around axis " << RotationAxis << ".");61 LOG(0, "Rotate " << mol->getName() << " around self by " << params.angle.get() << " radian around axis " << RotationAxis << "."); 62 62 63 63 for (molecule::iterator iter = mol->begin(); iter != mol->end(); ++iter) { 64 (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), params.angle ));64 (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), params.angle.get())); 65 65 } 66 66 LOG(0, "done."); … … 76 76 Vector *CenterOfGravity = mol->DetermineCenterOfGravity(); 77 77 LOG(0, "Center of gravity is " << *CenterOfGravity << "."); 78 Line RotationAxis(*CenterOfGravity, state->params.Axis );78 Line RotationAxis(*CenterOfGravity, state->params.Axis.get()); 79 79 delete(CenterOfGravity); 80 LOG(0, "Rotate " << mol->getName() << " around self by " << -state->params.angle << " radian around axis " << RotationAxis << ".");80 LOG(0, "Rotate " << mol->getName() << " around self by " << -state->params.angle.get() << " radian around axis " << RotationAxis << "."); 81 81 82 82 for (molecule::iterator iter = mol->begin(); iter != mol->end(); ++iter) { 83 (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), -state->params.angle ));83 (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), -state->params.angle.get())); 84 84 } 85 85 } … … 94 94 Vector *CenterOfGravity = mol->DetermineCenterOfGravity(); 95 95 LOG(0, "Center of gravity is " << *CenterOfGravity << "."); 96 Line RotationAxis(*CenterOfGravity, state->params.Axis );96 Line RotationAxis(*CenterOfGravity, state->params.Axis.get()); 97 97 delete(CenterOfGravity); 98 LOG(0, "Rotate " << mol->getName() << " around self by " << state->params.angle << " radian around axis " << RotationAxis << ".");98 LOG(0, "Rotate " << mol->getName() << " around self by " << state->params.angle.get() << " radian around axis " << RotationAxis << "."); 99 99 100 100 for (molecule::iterator iter = mol->begin(); iter != mol->end(); ++iter) { 101 (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), state->params.angle ));101 (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), state->params.angle.get())); 102 102 } 103 103 } -
src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.cpp
rb9c69d rf10b0c 49 49 RealSpaceMatrix InertiaTensor = mol->getInertiaTensor(); 50 50 51 mol->RotateToPrincipalAxisSystem( params.Axis);51 mol->RotateToPrincipalAxisSystem(const_cast<Vector &>(params.Axis.get())); 52 52 53 53 // summing anew for debugging (resulting matrix has to be diagonal!) -
src/Actions/MoleculeAction/SaveAdjacencyAction.cpp
rb9c69d rf10b0c 42 42 for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) { 43 43 mol = iter->second; 44 LOG(0, "Storing adjacency to path " << params.adjacencyfile << ".");44 LOG(0, "Storing adjacency to path " << params.adjacencyfile.get() << "."); 45 45 // TODO: sollte stream nicht filename benutzen, besser fuer unit test 46 46 #if BOOST_VERSION >= 104600 47 mol->StoreAdjacencyToFile(params.adjacencyfile. leaf().string(), params.adjacencyfile.branch_path().string());47 mol->StoreAdjacencyToFile(params.adjacencyfile.get().leaf().string(), params.adjacencyfile.get().branch_path().string()); 48 48 #else 49 mol->StoreAdjacencyToFile(params.adjacencyfile. leaf(), params.adjacencyfile.branch_path().string());49 mol->StoreAdjacencyToFile(params.adjacencyfile.get().leaf(), params.adjacencyfile.get().branch_path().string()); 50 50 #endif 51 51 } -
src/Actions/MoleculeAction/SaveBondsAction.cpp
rb9c69d rf10b0c 42 42 for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) { 43 43 mol = iter->second; 44 LOG(0, "Storing bonds to path " << params.bondsfile << ".");44 LOG(0, "Storing bonds to path " << params.bondsfile.get() << "."); 45 45 // TODO: sollte stream, nicht filenamen direkt nutzen, besser fuer unit tests 46 46 #if BOOST_VERSION >= 104600 47 mol->StoreBondsToFile(params.bondsfile. leaf().string(), params.bondsfile.branch_path().string());47 mol->StoreBondsToFile(params.bondsfile.get().leaf().string(), params.bondsfile.get().branch_path().string()); 48 48 #else 49 mol->StoreBondsToFile(params.bondsfile. leaf(), params.bondsfile.branch_path().string());49 mol->StoreBondsToFile(params.bondsfile.get().leaf(), params.bondsfile.get().branch_path().string()); 50 50 #endif 51 51 } -
src/Actions/MoleculeAction/SaveSelectedMoleculesAction.cpp
rb9c69d rf10b0c 38 38 /** =========== define the function ====================== */ 39 39 Action::state_ptr MoleculeSaveSelectedMoleculesAction::performCall() { 40 LOG(1, "Storing selected molecules to file " << params.filename << ".");40 LOG(1, "Storing selected molecules to file " << params.filename.get() << "."); 41 41 42 42 // extract suffix 43 43 std::string FilenameSuffix; 44 44 std::string FilenamePrefix; 45 if (params.filename. has_filename()) {45 if (params.filename.get().has_filename()) { 46 46 // get suffix 47 47 #if BOOST_VERSION >= 104600 48 FilenameSuffix = params.filename. extension().string().substr(1); // remove the prefixed "."49 FilenamePrefix = params.filename. stem().string();48 FilenameSuffix = params.filename.get().extension().string().substr(1); // remove the prefixed "." 49 FilenamePrefix = params.filename.get().stem().string(); 50 50 #else 51 FilenameSuffix = params.filename. extension().substr(1); // remove the prefixed "."52 FilenamePrefix = params.filename. stem();51 FilenameSuffix = params.filename.get().extension().substr(1); // remove the prefixed "." 52 FilenamePrefix = params.filename.get().stem(); 53 53 #endif 54 54 } else { … … 60 60 // parse the file 61 61 boost::filesystem::ofstream output; 62 output.open(params.filename );62 output.open(params.filename.get()); 63 63 if (!output.fail()) { 64 64 FormatParserStorage::getInstance().saveSelectedMolecules(output, FilenameSuffix); 65 65 } else { 66 ELOG(1, "Could not open file " << params.filename << ".");66 ELOG(1, "Could not open file " << params.filename.get() << "."); 67 67 } 68 68 output.close(); -
src/Actions/MoleculeAction/SaveTemperatureAction.cpp
rb9c69d rf10b0c 42 42 /** =========== define the function ====================== */ 43 43 Action::state_ptr MoleculeSaveTemperatureAction::performCall() { 44 LOG(1, "Storing temperatures in " << params.temperaturefile << ".");44 LOG(1, "Storing temperatures in " << params.temperaturefile.get() << "."); 45 45 ofstream output; 46 output.open(params.temperaturefile. string().c_str(), ios::trunc);46 output.open(params.temperaturefile.get().string().c_str(), ios::trunc); 47 47 AtomSetMixin<std::vector<atom *> > set(World::getInstance().getSelectedAtoms()); 48 48 const size_t MDSteps = set.getMaxTrajectorySize(); -
src/Actions/MoleculeAction/SuspendInWaterAction.cpp
rb9c69d rf10b0c 44 44 mol = iter->second; 45 45 LOG(0, "Evaluating necessary cell volume for a cluster suspended in water."); 46 if (params.density < 1.0) {46 if (params.density.get() < 1.0) { 47 47 ELOG(1, "Density must be greater than 1.0g/cm^3!"); 48 48 } else { 49 PrepareClustersinWater(World::getInstance().getConfig(), mol, volume, params.density ); // if volume == 0, will calculate from ConvexEnvelope49 PrepareClustersinWater(World::getInstance().getConfig(), mol, volume, params.density.get()); // if volume == 0, will calculate from ConvexEnvelope 50 50 } 51 51 } -
src/Actions/MoleculeAction/VerletIntegrationAction.cpp
rb9c69d rf10b0c 45 45 // TODO: sollte besser stream nutzen, nicht filename direkt (es sei denn, ist prefix), besser fuer unit test 46 46 char outputname[MAXSTRINGSIZE]; 47 strcpy(outputname, params.forcesfile. string().c_str());47 strcpy(outputname, params.forcesfile.get().string().c_str()); 48 48 AtomSetMixin<std::vector<atom *> > set(World::getInstance().getSelectedAtoms()); 49 for (int step = 0; step < params.MDSteps ; ++step) {50 VerletForceIntegration<std::vector<atom *> > Verlet(set, params.Deltat , step, false);51 if (!Verlet(outputname, 1, 0, params.FixedCenterOfMass ))52 LOG(2, "File " << params.forcesfile << " not found.");49 for (int step = 0; step < params.MDSteps.get(); ++step) { 50 VerletForceIntegration<std::vector<atom *> > Verlet(set, params.Deltat.get(), step, false); 51 if (!Verlet(outputname, 1, 0, params.FixedCenterOfMass.get())) 52 LOG(2, "File " << params.forcesfile.get() << " not found."); 53 53 else 54 LOG(2, "File " << params.forcesfile << " found and parsed.");54 LOG(2, "File " << params.forcesfile.get() << " found and parsed."); 55 55 } 56 56
Note:
See TracChangeset
for help on using the changeset viewer.