void reduceMoleculeToItsBasisSetOfAtoms(MolSymMolecule* mol, gint sym, gint nax) { /* printf("sym symh = %d\n", sym & SYM_H); printf("sym symv = %d\n", sym & SYM_V); printf("sym symd = %d\n", sym & SYM_D); printf("sym symi = %d\n", sym & SYM_I); printf("sym syms = %d\n", sym & SYM_S); printf("sym symDD = %d\n", sym & SYM_DD); printf("sym symT = %d\n", sym & SYM_T); printf("sym symO = %d\n", sym & SYM_O); printf("sym symIC = %d\n", sym & SYM_IC); printf("sym symR = %d\n", sym & SYM_R); printf("sym symU = %d\n", sym & SYM_U); printf("nax = %d\n", nax); */ /* cannot deal with high symmetries */ if (sym & SYM_R) return; if (sym & SYM_O) { reduceForOctaedralSymmetry(mol,sym); setEpsToZero(mol); return; } if (sym & SYM_T) { reduceForTetraedalSymmetry(mol,sym); setEpsToZero(mol); return; } if (sym & SYM_IC) { reduceForIcosaedralSymmetry(mol,sym); setEpsToZero(mol); return; } if (sym & SYM_H) removeHalfSpace(mol,XY_PLANE); else if (sym & SYM_I) removeHalfSpace(mol,POINT_INV); if (nax > 1) { removeByRotation(mol,nax,sym); if (sym & SYM_D) removeHalfSpace(mol,ROT2X); if (sym & SYM_S) removeHalfSpace(mol,XY_PLANE); } setEpsToZero(mol); }
void Bucket::removeEgg(const char * name) { for (size_t i = 0; i < this->elementsCount; i++) { if (strcmp(this->container[i].getName(), name) == 0) { //Shift left all remaining elements for (size_t j = i + 1; j < this->elementsCount; j++) { this->container[j - 1] = this->container[j]; } this->elementsCount--; if (this->elementsCount * 2 < this->containerSize) removeHalfSpace(this->container); return; } } }