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))
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))
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))