Example #1
0
 def test_aims_agent_aimsout(self):
     kwargs = self.required.copy()
     kwargs['job_name'] = 'aimsout'
     aimsout = 'aims.out'
     R = aims.Aims(job_dir=self.tmpdir,
                   check_consistency=False,
                   aims_outfile = aimsout,
                   **kwargs)
     self.assertEquals(R._tp_aimsout(), aimsout)
Example #2
0
    def test_aims_agent_with_dryrun(self):
        kwargs = self.required.copy()
        kwargs['job_name'] = 'writefiles'
        R = aims.Aims(job_dir=self.tmpdir,
                      check_consistency=False,
                      **kwargs)
        R.submit()
        supermucfile = os.path.isfile(os.path.join(self.tmpdir,
            'job.'+kwargs['job_name']+'.supermuc'))

        self.assertTrue(supermucfile)
Example #3
0
    def test_aims_consistency_check_with_files(self):
        geomfile_path = os.path.join(self.tmpdir, 'geometry.in')
        controlfile_path = os.path.join(self.tmpdir, 'control.in')

        open(geomfile_path, 'w').close()
        with open(controlfile_path, 'w') as f:
            f.write('walltime')

        kwargs = self.required.copy()
        kwargs['job_name'] = 'consistency'
        kwargs['program'] = 'ls'

        R = aims.Aims(job_dir=self.tmpdir,
                      check_consistency=True,
                      **kwargs)
        R.submit()
Example #4
0
    def test_aims_consistency_check_with_files_adds_walltime(self):
        geomfile_path = os.path.join(self.tmpdir, 'geometry.in')
        controlfile_path = os.path.join(self.tmpdir, 'control.in')

        open(geomfile_path, 'w').close()
        open(controlfile_path, 'w').close()

        kwargs = self.required.copy()
        kwargs['job_name'] = 'consistency_walltime'
        kwargs['program'] = 'ls'

        R = aims.Aims(job_dir=self.tmpdir,
                      check_consistency=True,
                      **kwargs)
        R.submit()

        walltime = False
        print(controlfile_path)
        for line in open(controlfile_path, 'r'):
            if 'walltime' in line:
                walltime = True
                break
        self.assertTrue(walltime)
Example #5
0
 def test_aims_consistency_check_raises_warning(self):
     with self.assertRaises(Warning):
         R = aims.Aims(job_dir=self.tmpdir,
                               check_consistency=True,
                               **self.required)
         R.submit()