src/NFinput/parseSymRxns.cpp
//Checks only at reaction center (Assumes all symmetries are at reaction center!)
Checks only at reaction center (Assumes all symmetries are at reaction center!)
Checks only at reaction center ( Assumes all symmetries are at reaction center! )
bool isMoleculePermuationValid(
		int mId,
		vector <vector <vector <component> > > &symmetries,
		vector <vector <int> > &originalPosition,
		vector <string> &uniqueComponents,
		vector <int> &currentPosition,
		vector <map <string,component> > &thisMoleculeSymMap
		)
{
	vector <string> usedNames;
	for(unsigned int k=0; k<currentPosition.size(); k++) {
		component *c;
		c = &symmetries.at(mId).at(0).at(originalPosition.at(k).at(currentPosition.at(k)));
		for(unsigned int u=0; u<usedNames.size(); u++) {
			if(usedNames.at(u).compare(c->symPermutationName)==0) {
				return false;
			}
		}
		usedNames.push_back(c->symPermutationName);
	}
	return true;
}
bool isMoleculePermuationValid ( int mId , vector < vector < vector < component > > > & symmetries , vector < vector < int > > & originalPosition , vector < string > & uniqueComponents , vector < int > & currentPosition , vector < map < string , component > > & thisMoleculeSymMap ) { vector < string > usedNames ; for ( unsigned int k = 0 ; k < currentPosition . size ( ) ; k ++ ) { component * c ; c = & symmetries . at ( mId ) . at ( 0 ) . at ( originalPosition . at ( k ) . at ( currentPosition . at ( k ) ) ) ; for ( unsigned int u = 0 ; u < usedNames . size ( ) ; u ++ ) { if ( usedNames . at ( u ) . compare ( c -> symPermutationName ) == 0 ) { return false ; } } usedNames . push_back ( c -> symPermutationName ) ; } return true ; }
Checks only at reaction center (Assumes all symmetries are at reaction center!)
Checks only at reaction center ( Assumes all symmetries are at reaction center! )
//First check if this permutation is self consistent (meaning each //unique component is mapped to only one symmetric component) ///// Output for debugging //cout<<"currentPosition (originalPosition) Array"<<endl; //for(unsigned int k=0; k<currentPosition.size(); k++) { //	cout<<currentPosition.at(k)<<" ("; //	cout<<originalPosition.at(k).at(currentPosition.at(k))<<") "; //} //cout<<endl;