def merge(self):
        """
        Merge the two models together to generate both chemkin and dictionary files.
        """

        import rmgpy.tools.merge_models as merge_models
        import sys

        inputModelFiles = []
        inputModelFiles.append((self.chemkin1, self.dict1, None))
        inputModelFiles.append((self.chemkin2, self.dict2, None))

        kwargs = {
            'wd': self.path,
            'transport': False,
        }
        
        logfile = os.path.join(self.path,'merging_log.txt')
        
        # Save stdout to logfile which the user can download
        with open(logfile, 'w') as f:
            stdout_orig = sys.stdout
            sys.stdout = f
            
            merge_models.execute(
                        inputModelFiles,
                        **kwargs
                        )
            
            sys.stdout = stdout_orig
Example #2
0
    def merge(self):
        """
        Merge the two models together to generate both chemkin and dictionary files.
        """

        import rmgpy.tools.merge_models as merge_models

        inputModelFiles = []
        inputModelFiles.append((self.chemkin1, self.dict1, None))
        inputModelFiles.append((self.chemkin2, self.dict2, None))

        kwargs = {"wd": self.path, "transport": False}

        merge_models.execute(inputModelFiles, **kwargs)