- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp
rf10b0c rbe21fa 46 46 /** =========== define the function ====================== */ 47 47 Action::state_ptr MoleculeFillVoidWithMoleculeAction::performCall() { 48 if (!boost::filesystem::exists(params.fillername .get())) {49 ELOG(1, "File with filler molecule " << params.fillername .get()<< " does not exist!");48 if (!boost::filesystem::exists(params.fillername)) { 49 ELOG(1, "File with filler molecule " << params.fillername << " 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 .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()<< ".");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 << "."); 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. get().string().substr(params.fillername.get().string().find_last_of('.')+1, params.fillername.get().string().length());63 std::string FilenameSuffix = params.fillername.string().substr(params.fillername.string().find_last_of('.')+1, params.fillername.string().length()); 64 64 ifstream input; 65 input.open(params.fillername. get().string().c_str());65 input.open(params.fillername.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. get().string().c_str());74 filler->SetNameFromFilename(params.fillername.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 .get()[i];81 distance[i] = params.distances[i]; 82 82 FillVoidWithMolecule( 83 83 filler, 84 84 *(World::getInstance().getConfig()), 85 85 distance, 86 params.boundary .get(),87 params.RandAtomDisplacement .get(),88 params.RandMoleculeDisplacement .get(),89 params.MinDistance .get(),90 params.DoRotate .get());86 params.boundary, 87 params.RandAtomDisplacement, 88 params.RandMoleculeDisplacement, 89 params.MinDistance, 90 params.DoRotate); 91 91 92 92 // generate list of newly created molecules
Note:
See TracChangeset
for help on using the changeset viewer.