Ejemplo n.º 1
0
 def test_commandstr(self):
     '''Absolute coordinates with a comment string different to reffile'''
     infile = self.get_input('h2o.gen')
     reffile = self.get_input('h2o_comment.xyz')
     outfile = self.get_output('h2o_comment.xyz')
     cmdargs = ['-o', outfile, '-c', "something", infile]
     gen2xyz.main(cmdargs)
     self.assertTrue(common.xyz_file_equals(outfile, reffile))
     self.assertFalse(common.xyz_file_equals(outfile, reffile,\
                      check_comment=True))
Ejemplo n.º 2
0
 def test_cluster(self):
     '''Absolute coordinates without external lattice vectors'''
     infile = self.get_input('h2o.234.gen')
     reffile = self.get_input('h2o.234.xyz')
     outfile = self.get_output('h2o.234.xyz')
     cmdargs = ['-o', outfile, infile]
     gen2xyz.main(cmdargs)
     self.assertTrue(common.xyz_file_equals(outfile, reffile))
Ejemplo n.º 3
0
 def test_periodicabs_lattice(self):
     '''Absolute coordinates with external lattice vectors'''
     infile = self.get_input('h2o.gen')
     latticefile = self.get_input('h2o.latvecs')
     reffile = self.get_input('h2o.xyz')
     outfile = self.get_output('h2o.xyz')
     cmdargs = ['-l', latticefile, '-o', outfile, infile]
     gen2xyz.main(cmdargs)
     self.assertTrue(common.xyz_file_equals(outfile, reffile))