diff --git a/dpdata/gaussian/gjf.py b/dpdata/gaussian/gjf.py index c2652747e..6c169b48c 100644 --- a/dpdata/gaussian/gjf.py +++ b/dpdata/gaussian/gjf.py @@ -234,7 +234,7 @@ def make_gaussian_input( cell = sys_data['cells'][0] for ii in range(3): # use TV as atomic symbol, see https://gaussian.com/pbc/ - buff.append('TV %f %f %f' % (symbol, *cell[ii])) + buff.append('TV %f %f %f' % (*cell[ii],)) if basis_set is not None: # custom basis set buff.extend(['', basis_set, '']) diff --git a/tests/test_gaussian_gjf.py b/tests/test_gaussian_gjf.py new file mode 100644 index 000000000..350b5025d --- /dev/null +++ b/tests/test_gaussian_gjf.py @@ -0,0 +1,14 @@ +import unittest +import os + +from context import dpdata + + +class TestGaussianGJF(unittest.TestCase): + def setUp (self) : + self.system = dpdata.LabeledSystem('poscars/OUTCAR.h2o.md', + fmt = 'vasp/outcar') + + def test_dump_gaussian_gjf(self): + self.system.to_gaussian_gjf('tmp.gjf', keywords="force b3lyp/6-31g*") + os.remove('tmp.gjf')