private void matchStereochemistryToAtomsAndBonds(Element stereoChemistryEl) throws StructureBuildingException, StereochemistryException {
		String stereoChemistryType =stereoChemistryEl.getAttributeValue(TYPE_ATR);
		if (stereoChemistryType.equals(R_OR_S_TYPE_VAL)){
			assignStereoCentre(stereoChemistryEl);
		}
		else if (stereoChemistryType.equals(E_OR_Z_TYPE_VAL)){
			assignStereoBond(stereoChemistryEl);
		}
		else if (stereoChemistryType.equals(CISORTRANS_TYPE_VAL)){
			if (!assignCisTransOnRing(stereoChemistryEl)){
				assignStereoBond(stereoChemistryEl);
			}
		}
		else if (stereoChemistryType.equals(ALPHA_OR_BETA_TYPE_VAL)){
			assignAlphaBetaXiStereochem(stereoChemistryEl);
		}
		else if (stereoChemistryType.equals(ENDO_EXO_SYN_ANTI_TYPE_VAL)){
			throw new StereochemistryException(stereoChemistryType + " stereochemistry is not currently interpretable by OPSIN");
		}
		else if (stereoChemistryType.equals(RELATIVECISTRANS_TYPE_VAL)){
			throw new StereochemistryException(stereoChemistryType + " stereochemistry is not currently interpretable by OPSIN");
		}
		else if (stereoChemistryType.equals(AXIAL_TYPE_VAL)){
			throw new StereochemistryException(stereoChemistryType + " stereochemistry is not currently interpretable by OPSIN");
		}
		else if (stereoChemistryType.equals(OPTICALROTATION_TYPE_VAL)){
			state.addWarning(OpsinWarningType.STEREOCHEMISTRY_IGNORED, "Optical rotation cannot be algorithmically used to assign stereochemistry. This term was ignored: " + stereoChemistryEl.getValue());
		}
		else{
			throw new StructureBuildingException("Unexpected stereochemistry type: " +stereoChemistryType);
		}
		stereoChemistryEl.detach();
	}