Exemple #1
0
    def parse(self):
        if 'c' in self.file:
            if not is_readable(self.file['c']):
                return
            chk = ChkGaussian()
            chk.file = self.file['c']
            self.surface = chk.formchk()

        elif 'f' in self.file:
            if not is_readable(self.file['f']):
                return
            self.surface = FchkGaussian()
            self.surface.file = self.file['f']

        elif 'cb' in self.file:
            if not is_readable(self.file['cb']):
                return
            self.surface = Cube()
            self.surface.file = self.file['cb']

        else:
            log.error('No Gaussian Checkpoint file name provided')

        self.surface.isotype = self.file['type']
        if 'iv' in self.file:
            self.surface.isovalue = self.file['iv']
        self.surface.parse()
Exemple #2
0
    def parse(self):
        #self.file = self.file[0]

        if not 'l' in self.file:
            log.error('NBOinteraction requires Gaussian .log file as input')
            return
        self.fileL = self.file['l']
        if not is_readable(self.fileL):
            return
        self.L.file = self.fileL

        if 'c' in self.file:
            self.fileC = self.file['c']
        else:
            log.debug('Gaussian checkpoint file name is not provided in the input; trying to guess...')
            self.fileC = self.LookUpChkInLog()
            if self.fileC:
                log.debug('Checkpoint file found: %s' % (self.fileC))
            else:
                self.fileC = self.LookUpByBasename()
        if not is_readable(self.fileC):
            return
        self.C.file = self.fileC
        self.L.parse()
        self.C.parse()
Exemple #3
0
    def parse(self,WebPath='',ToBeCopied = True):
        # Check if .jvxl is readable
        if not 'j' in self.file:
            log.error('JVXL file is needed')
            return
        self.fileJ = self.file['j']
        if not is_readable(self.fileJ):
            log.warning('JVXL file is not readable')
            return

        # Parse XYZ File
        if 'x' in self.file:
            self.fileX = self.file['x']
        else:
            log.debug('XYZ file name is not provided in the input; trying to guess...')
            self.fileX = self.LookUpByBasename()
        if is_readable(self.fileX):
            log.debug('XYZ file found: %s' % (self.fileX))
        else:
            log.warning('XYZ file is not readable')
            return
        self.X.file = self.fileX
        self.X.parse()

        # Copy JVXL file
        rp = self.settings.real_path('.jvxl')
        shutil.copy(self.fileJ,rp)
        self.wp = self.settings.web_path('.jvxl')
    def parse(self):
        if 'c' in self.file:
            if not is_readable(self.file['c']):
                return
            chk = ChkGaussian()
            chk.file = self.file['c']
            self.surface = chk.formchk()

        elif 'f' in self.file:
            if not is_readable(self.file['f']):
                return
            self.surface = FchkGaussian()
            self.surface.file = self.file['f']

        elif 'cb' in self.file:
            if not is_readable(self.file['cb']):
                return
            self.surface = Cube()
            self.surface.file = self.file['cb']

        else:
            log.error('No Gaussian Checkpoint file name provided')

        self.surface.isotype = self.file['type']
        if 'iv' in self.file:
            self.surface.isovalue = self.file['iv']
        self.surface.parse()
Exemple #5
0
    def parse(self, WebPath='', ToBeCopied=True):
        # Check if .jvxl is readable
        if not 'j' in self.file:
            log.error('JVXL file is needed')
            return
        self.fileJ = self.file['j']
        if not is_readable(self.fileJ):
            log.warning('JVXL file is not readable')
            return

        # Parse XYZ File
        if 'x' in self.file:
            self.fileX = self.file['x']
        else:
            log.debug(
                'XYZ file name is not provided in the input; trying to guess...'
            )
            self.fileX = self.LookUpByBasename()
        if is_readable(self.fileX):
            log.debug('XYZ file found: %s' % (self.fileX))
        else:
            log.warning('XYZ file is not readable')
            return
        self.X.file = self.fileX
        self.X.parse()

        # Copy JVXL file
        rp = self.settings.real_path('.jvxl')
        shutil.copy(self.fileJ, rp)
        self.wp = self.settings.web_path('.jvxl')