Skip to content

Commit

Permalink
Merge pull request #257 from GOMC-WSU/issue256
Browse files Browse the repository at this point in the history
Fix to #256
  • Loading branch information
YounesN authored Oct 30, 2020
2 parents 431ac86 + dc66792 commit cc4da23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/MolSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ int createMapAndModifyPDBAtomDataStructure( const BondAdjacencyList & bondAdjLis
/* Found molecules with the same size, now evaluate for atom equality */
} else {
/* Iterate through all the size consistent map entries */
for (std::vector<std::__cxx11::string>::const_iterator sizeConsistentEntries = sizeIt->second.cbegin();
for (std::vector<std::string>::const_iterator sizeConsistentEntries = sizeIt->second.cbegin();
sizeConsistentEntries != sizeIt->second.cend(); sizeConsistentEntries++){
/* Iterate atom by atom of a given size consistent map entries with the candidate molecule*/
typedef std::vector<mol_setup::Atom>::const_iterator atomIterator;
Expand Down Expand Up @@ -426,7 +426,7 @@ int createMapAndModifyPDBAtomDataStructure( const BondAdjacencyList & bondAdjLis
SizeMap::iterator sizeIt = sizeMap.find(it->size());
/* New Size */
if (sizeIt == sizeMap.end()) {
sizeMap[it->size()] = std::vector<std::__cxx11::string>{fragName};
sizeMap[it->size()] = std::vector<std::string>{fragName};
} else {
sizeMap[it->size()].push_back(fragName);
}
Expand Down Expand Up @@ -459,7 +459,7 @@ int createMapAndModifyPDBAtomDataStructure( const BondAdjacencyList & bondAdjLis
/* Found molecules with the same size, now evaluate for atom equality */
} else {
/* Iterate through all the size consistent map entries */
for (std::vector<std::__cxx11::string>::const_iterator sizeConsistentEntries = sizeIt->second.cbegin();
for (std::vector<std::string>::const_iterator sizeConsistentEntries = sizeIt->second.cbegin();
sizeConsistentEntries != sizeIt->second.cend(); sizeConsistentEntries++){
/* Iterate atom by atom of a given size consistent map entries with the candidate molecule*/
typedef std::vector<mol_setup::Atom>::const_iterator atomIterator;
Expand Down Expand Up @@ -544,7 +544,7 @@ int createMapAndModifyPDBAtomDataStructure( const BondAdjacencyList & bondAdjLis
MolSetup::copyBondInfoIntoMapEntry(bondAdjList, kindMap, fragName);
resKindIndex++;
if (newSize){
sizeMap[it->size()] = std::vector<std::__cxx11::string>{fragName};
sizeMap[it->size()] = std::vector<std::string>{fragName};
} else {
sizeMap[it->size()].push_back(fragName);
}
Expand All @@ -555,7 +555,7 @@ int createMapAndModifyPDBAtomDataStructure( const BondAdjacencyList & bondAdjLis
pdbAtoms.lastResKindIndex = resKindIndex;
}

typedef std::map<std::__cxx11::string, mol_setup::MolKind> MolMap;
typedef std::map<std::string, mol_setup::MolKind> MolMap;
void MolSetup::copyBondInfoIntoMapEntry(const BondAdjacencyList & bondAdjList, mol_setup::MolMap & kindMap, std::string fragName){

unsigned int molBegin = kindMap[fragName].firstAtomID - 1;
Expand Down
2 changes: 1 addition & 1 deletion src/MolSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ std::vector<Bond> BondsAll(const MolKind& molKind);

//first element (string) is name of molecule type
typedef std::map<std::string, MolKind> MolMap;
typedef std::map<std::size_t, std::vector<std::__cxx11::string> > SizeMap;
typedef std::map<std::size_t, std::vector<std::string> > SizeMap;

//! Reads one or more PSF files into kindMap
/*!
Expand Down

0 comments on commit cc4da23

Please sign in to comment.