class TestSpecies(unittest.TestCase):
    def setUp(self):
        self.species = Species(smiles=["CC"])

    def test_generate_structures(self):
        self.assertIsInstance(self.species.generate_structures(), dict)
        self.assertIsInstance(
            self.species.generate_structures().values()[0][0], Conformer)
Exemple #2
0
    def generate_reactants_and_products(self):
        """
        A module that will generate AutoTST Species for a given reaction's 
        reactants and products

        Variabels:
        - rmg_reaction (RMGReaction): the RMGReaction of interest

        Returns:
        - reactants (list): a list of AutoTST Species corresponding to the reactnats
        - products (list): a list of AutoTST Species corresponding to the products
        """
        if self.rmg_reaction is None:
            self.get_rmg_reaction()

        self.reactants = []
        self.products = []
        for react in self.rmg_reaction.reactants:
            mol = Species(rmg_species=react)
            mol.generate_structures()
            self.reactants.append(mol)

        for prod in self.rmg_reaction.products:
            mol = Species(rmg_species=prod)
            mol.generate_structures()
            self.products.append(mol)

        return self.reactants, self.products
Exemple #3
0
    def generate_reactants_and_products(self, rmg_reaction=None):
        """
        A module that will generate AutoTST molecules for a given reaction
        """

        if not rmg_reaction:
            rmg_reaction = self.rmg_reaction

        reactants = []
        products = []
        for react in rmg_reaction.reactants:
            mol = Species(rmg_species=react)
            mol.generate_structures()
            reactants.append(mol)

        for prod in rmg_reaction.products:
            mol = Species(rmg_species=prod)
            mol.generate_structures()
            products.append(mol)

        self.reactants = reactants
        self.products = products
        return self.reactants, self.products
 def setUp(self):
     self.species = Species(smiles=["CC"])