def GetTransfromedReactionEnergies(self,
                                       S,
                                       cids,
                                       pH=None,
                                       I=None,
                                       pMg=None,
                                       T=None,
                                       conc=1):
        dG0_r = PsuedoisomerTableThermodynamics.GetTransfromedReactionEnergies(
            self, S, cids, pH, I, pMg, T)
        if conc != 1:
            pH, I, pMg, T = self.GetConditions(pH, I, pMg, T)
            dG0_r += AddConcentrationsToReactionEnergies(S, cids, T, conc)

        # find the mapping between the list of all CIDs and the list that the
        # new S is using
        all_cids = sorted(self.kegg.get_all_cids())
        inds = [all_cids.index(cid) for cid in cids]

        # test to see if any of the reactions in S violate any conservation laws
        violations = abs(self.P_L_tot[:, inds] * S).sum(0) > self.epsilon
        dG0_r[violations] = np.nan
        return dG0_r