2015-08-10 11:32:08 +02:00
|
|
|
|
2016-03-10 12:24:05 +01:00
|
|
|
import applications.dft.converters.plovasp.vaspio
|
|
|
|
from applications.dft.converters.plovasp.inpconf import ConfigParameters
|
|
|
|
from applications.dft.converters.plovasp.plotools import check_data_consistency
|
|
|
|
from applications.dft.converters.plovasp.elstruct import ElectronicStructure
|
2015-08-10 11:32:08 +02:00
|
|
|
import mytest
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# TestDataConsistency
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
class TestDataConsistency(mytest.MyTestCase):
|
|
|
|
"""
|
|
|
|
Function:
|
|
|
|
|
2015-09-16 11:40:01 +02:00
|
|
|
def check_data_consistency(pars, el_struct)
|
2015-08-10 11:32:08 +02:00
|
|
|
|
|
|
|
Scenarios:
|
|
|
|
|
2015-09-16 11:40:01 +02:00
|
|
|
- **if** a shell contains ions of different types **raise** AssertionError
|
2015-08-10 11:32:08 +02:00
|
|
|
"""
|
|
|
|
# Scenario 1
|
2015-09-16 11:40:01 +02:00
|
|
|
def test_shell_ion_types(self):
|
|
|
|
pass
|
|
|
|
# conf_file = 'wrong_shell.cfg'
|
|
|
|
# pars = ConfigParameters(conf_file)
|
|
|
|
# pars.parse_input()
|
|
|
|
# vasp_data = vaspio.VaspData('./', read_all=False)
|
|
|
|
# vasp_data.poscar.from_file('./', poscar_filename='POSCAR.complex')
|
|
|
|
# el_strct = ElectronicStructure(vasp_data)
|
|
|
|
#
|
|
|
|
# print pars.shells
|
|
|
|
# print vasp_data.poscar.type_of_ion
|
|
|
|
#
|
|
|
|
# err_mess = "Each projected shell must"
|
|
|
|
# with self.assertRaisesRegexp(Exception, err_mess):
|
|
|
|
# check_data_consistency(pars, el_struct)
|
2015-08-10 11:32:08 +02:00
|
|
|
|