def test_get_incar(self):
    incar = self.paramset.get_incar(self.struct)
    self.assertEqual(incar['LDAUU'], [5.3, 0, 0])
    self.assertAlmostEqual(incar['EDIFF'], 0.0012)
    incar = self.mitparamset.get_incar(self.struct)
    self.assertEqual(incar['LDAUU'], [4.0, 0, 0])
    self.assertAlmostEqual(incar['EDIFF'], 0.0012)
    incar_gga = self.mitggaparam.get_incar(self.struct)
    self.assertNotIn('LDAU', incar_gga)
    incar_static = self.mpstaticparamset.get_incar(self.struct)
    self.assertEqual(incar_static['NSW'], 0)
    incar_nscfl = self.mpnscfparamsetl.get_incar(self.struct)
    self.assertEqual(incar_nscfl['NBANDS'], 60)
    incar_nscfu = self.mpnscfparamsetu.get_incar(self.struct)
    self.assertEqual(incar_nscfu['ISYM'], 0)
    incar_hse = self.mphseparamset.get_incar(self.struct)
    self.assertEqual(incar_hse['LHFCALC'], True)
    self.assertEqual(incar_hse['HFSCREEN'], 0.2)
    incar_hse_bsl = self.mpbshseparamsetl.get_incar(self.struct)
    self.assertEqual(incar_hse_bsl['LHFCALC'], True)
    self.assertEqual(incar_hse_bsl['HFSCREEN'], 0.2)
    self.assertEqual(incar_hse_bsl['NSW'], 0)
    incar_hse_bsu = self.mpbshseparamsetu.get_incar(self.struct)
    self.assertEqual(incar_hse_bsu['LHFCALC'], True)
    self.assertEqual(incar_hse_bsu['HFSCREEN'], 0.2)
    self.assertEqual(incar_hse_bsu['NSW'], 0)
    incar_diel = self.mpdielparamset.get_incar(self.struct)
    self.assertEqual(incar_diel['IBRION'], 8)
    self.assertEqual(incar_diel['LEPSILON'], True)
    si = 14
    coords = list()
    coords.append(np.array([0, 0, 0]))
    coords.append(np.array([0.75, 0.5, 0.75]))
    latt = Lattice(np.array([[3.8401979337, 0.0, 0.0], [1.9200989668, 3.3257101909, 0.0], [0.0, (- 2.2171384943), 3.1355090603]]))
    struct = Structure(latt, [si, si], coords)
    incar = self.paramset.get_incar(struct)
    self.assertNotIn('LDAU', incar)
    incar = self.mithseparamset.get_incar(self.struct)
    self.assertTrue(incar['LHFCALC'])
    coords = list()
    coords.append([0, 0, 0])
    coords.append([0.75, 0.5, 0.75])
    lattice = Lattice([[3.8401979337, 0.0, 0.0], [1.9200989668, 3.3257101909, 0.0], [0.0, (- 2.2171384943), 3.1355090603]])
    struct = Structure(lattice, ['Fe', 'Mn'], coords)
    incar = self.paramset.get_incar(struct)
    self.assertNotIn('LDAU', incar)
    struct = Structure(lattice, ['Fe', 'F'], coords)
    incar = self.paramset.get_incar(struct)
    self.assertEqual(incar['LDAUU'], [5.3, 0])
    self.assertEqual(incar['MAGMOM'], [5, 0.6])
    struct = Structure(lattice, ['Fe', 'F'], coords)
    incar = self.mitparamset.get_incar(struct)
    self.assertEqual(incar['LDAUU'], [4.0, 0])
    struct = Structure(lattice, ['Fe2+', 'O2-'], coords)
    incar = self.paramset.get_incar(struct)
    self.assertEqual(incar['LDAUU'], [5.3, 0])
    struct = Structure(lattice, ['Fe', 'Mn'], coords, site_properties={'magmom': (5.2, (- 4.5))})
    incar = self.paramset.get_incar(struct)
    self.assertEqual(incar['MAGMOM'], [(- 4.5), 5.2])
    incar = self.mpstaticparamset.get_incar(struct)
    self.assertEqual(incar['MAGMOM'], [(- 4.5), 5.2])
    incar = self.mitparamset_unsorted.get_incar(struct)
    self.assertEqual(incar['MAGMOM'], [5.2, (- 4.5)])
    struct = Structure(lattice, [Specie('Fe', 2, {'spin': 4.1}), 'Mn'], coords)
    incar = self.paramset.get_incar(struct)
    self.assertEqual(incar['MAGMOM'], [5, 4.1])
    incar = self.mpnscfparamsetl.get_incar(struct)
    self.assertEqual(incar.get('MAGMOM', None), None)
    struct = Structure(lattice, ['Mn3+', 'Mn4+'], coords)
    incar = self.mitparamset.get_incar(struct)
    self.assertEqual(incar['MAGMOM'], [4, 3])
    incar = self.mpnscfparamsetu.get_incar(struct)
    self.assertEqual(incar.get('MAGMOM', None), None)
    self.assertEqual(self.userparamset.get_incar(struct)['MAGMOM'], [100, 0.6])
    coords = list()
    coords.append([0, 0, 0])
    coords.append([0.75, 0.5, 0.75])
    coords.append([0.25, 0.5, 0])
    struct = Structure(lattice, ['Fe', 'Fe', 'S'], coords)
    incar = self.mitparamset.get_incar(struct)
    self.assertEqual(incar['LDAUU'], [1.9, 0])
    self.assertNotIn('LDAUU', self.paramset.get_incar(struct))
    self.assertNotIn('LDAUU', self.mpstaticparamset.get_incar(struct))
    struct = Structure(lattice, ['Fe', 'S', 'O'], coords)
    incar = self.mitparamset.get_incar(struct)
    self.assertEqual(incar['LDAUU'], [4.0, 0, 0])
    self.assertEqual(self.paramset.get_incar(struct)['LDAUU'], [5.3, 0, 0])
    self.assertEqual(self.mpnscfparamsetl.get_incar(struct)['LDAUU'], [5.3, 0, 0])
    self.assertEqual(self.userparamset.get_incar(struct)['MAGMOM'], [10, (- 5), 0.6])
def test_get_incar(self):
    incar = self.paramset.get_incar(self.struct)
    self.assertEqual(incar['LDAUU'], [5.3, 0, 0])
    self.assertAlmostEqual(incar['EDIFF'], 0.0012)
    incar = self.mitparamset.get_incar(self.struct)
    self.assertEqual(incar['LDAUU'], [4.0, 0, 0])
    self.assertAlmostEqual(incar['EDIFF'], 0.0012)
    incar_gga = self.mitggaparam.get_incar(self.struct)
    self.assertNotIn('LDAU', incar_gga)
    incar_static = self.mpstaticparamset.get_incar(self.struct)
    self.assertEqual(incar_static['NSW'], 0)
    incar_nscfl = self.mpnscfparamsetl.get_incar(self.struct)
    self.assertEqual(incar_nscfl['NBANDS'], 60)
    incar_nscfu = self.mpnscfparamsetu.get_incar(self.struct)
    self.assertEqual(incar_nscfu['ISYM'], 0)
    incar_hse = self.mphseparamset.get_incar(self.struct)
    self.assertEqual(incar_hse['LHFCALC'], True)
    self.assertEqual(incar_hse['HFSCREEN'], 0.2)
    incar_hse_bsl = self.mpbshseparamsetl.get_incar(self.struct)
    self.assertEqual(incar_hse_bsl['LHFCALC'], True)
    self.assertEqual(incar_hse_bsl['HFSCREEN'], 0.2)
    self.assertEqual(incar_hse_bsl['NSW'], 0)
    incar_hse_bsu = self.mpbshseparamsetu.get_incar(self.struct)
    self.assertEqual(incar_hse_bsu['LHFCALC'], True)
    self.assertEqual(incar_hse_bsu['HFSCREEN'], 0.2)
    self.assertEqual(incar_hse_bsu['NSW'], 0)
    incar_diel = self.mpdielparamset.get_incar(self.struct)
    self.assertEqual(incar_diel['IBRION'], 8)
    self.assertEqual(incar_diel['LEPSILON'], True)
    si = 14
    coords = list()
    coords.append(np.array([0, 0, 0]))
    coords.append(np.array([0.75, 0.5, 0.75]))
    latt = Lattice(np.array([[3.8401979337, 0.0, 0.0], [1.9200989668, 3.3257101909, 0.0], [0.0, (- 2.2171384943), 3.1355090603]]))
    struct = Structure(latt, [si, si], coords)
    incar = self.paramset.get_incar(struct)
    self.assertNotIn('LDAU', incar)
    incar = self.mithseparamset.get_incar(self.struct)
    self.assertTrue(incar['LHFCALC'])
    coords = list()
    coords.append([0, 0, 0])
    coords.append([0.75, 0.5, 0.75])
    lattice = Lattice([[3.8401979337, 0.0, 0.0], [1.9200989668, 3.3257101909, 0.0], [0.0, (- 2.2171384943), 3.1355090603]])
    struct = Structure(lattice, ['Fe', 'Mn'], coords)
    incar = self.paramset.get_incar(struct)
    self.assertNotIn('LDAU', incar)
    struct = Structure(lattice, ['Fe', 'F'], coords)
    incar = self.paramset.get_incar(struct)
    self.assertEqual(incar['LDAUU'], [5.3, 0])
    self.assertEqual(incar['MAGMOM'], [5, 0.6])
    struct = Structure(lattice, ['Fe', 'F'], coords)
    incar = self.mitparamset.get_incar(struct)
    self.assertEqual(incar['LDAUU'], [4.0, 0])
    struct = Structure(lattice, ['Fe2+', 'O2-'], coords)
    incar = self.paramset.get_incar(struct)
    self.assertEqual(incar['LDAUU'], [5.3, 0])
    struct = Structure(lattice, ['Fe', 'Mn'], coords, site_properties={'magmom': (5.2, (- 4.5))})
    incar = self.paramset.get_incar(struct)
    self.assertEqual(incar['MAGMOM'], [(- 4.5), 5.2])
    incar = self.mpstaticparamset.get_incar(struct)
    self.assertEqual(incar['MAGMOM'], [(- 4.5), 5.2])
    incar = self.mitparamset_unsorted.get_incar(struct)
    self.assertEqual(incar['MAGMOM'], [5.2, (- 4.5)])
    struct = Structure(lattice, [Specie('Fe', 2, {'spin': 4.1}), 'Mn'], coords)
    incar = self.paramset.get_incar(struct)
    self.assertEqual(incar['MAGMOM'], [5, 4.1])
    incar = self.mpnscfparamsetl.get_incar(struct)
    self.assertEqual(incar.get('MAGMOM', None), None)
    struct = Structure(lattice, ['Mn3+', 'Mn4+'], coords)
    incar = self.mitparamset.get_incar(struct)
    self.assertEqual(incar['MAGMOM'], [4, 3])
    incar = self.mpnscfparamsetu.get_incar(struct)
    self.assertEqual(incar.get('MAGMOM', None), None)
    self.assertEqual(self.userparamset.get_incar(struct)['MAGMOM'], [100, 0.6])
    coords = list()
    coords.append([0, 0, 0])
    coords.append([0.75, 0.5, 0.75])
    coords.append([0.25, 0.5, 0])
    struct = Structure(lattice, ['Fe', 'Fe', 'S'], coords)
    incar = self.mitparamset.get_incar(struct)
    self.assertEqual(incar['LDAUU'], [1.9, 0])
    self.assertNotIn('LDAUU', self.paramset.get_incar(struct))
    self.assertNotIn('LDAUU', self.mpstaticparamset.get_incar(struct))
    struct = Structure(lattice, ['Fe', 'S', 'O'], coords)
    incar = self.mitparamset.get_incar(struct)
    self.assertEqual(incar['LDAUU'], [4.0, 0, 0])
    self.assertEqual(self.paramset.get_incar(struct)['LDAUU'], [5.3, 0, 0])
    self.assertEqual(self.mpnscfparamsetl.get_incar(struct)['LDAUU'], [5.3, 0, 0])
    self.assertEqual(self.userparamset.get_incar(struct)['MAGMOM'], [10, (- 5), 0.6])