smiles script need refactor and additional tests
Upon splitting shape.py into three separate tools, one of which is smiles (corresponding to shape.py -i smiles_input.sml ... -s smiles [extra_options]), some functionality disappeared from this (smiles) branch of shape.py.
Examples:
- Full input file name with the extension included is not recognized:
> smiles -i inp/smiles_SDS.sml -o config_SO4C12_smiles_azT.gro -r SO4C12
ERROR! smiles.py.main:36::
Unrecognised output format: 'config_SO4C12_smiles_azT.gro' [no extension => DL_POLY/DL_MESO CONFIG]
Traceback (most recent call last):
File "/home/avb7119/PycharmProjects/shapespyer/scripts/smiles.py", line 33, in main
gen.dump_file()
File "/home/avb7119/PycharmProjects/shapespyer/shapes/basics/utils.py", line 1649, in dump_file
self.writer_handler.write_output(self.mols_out, self.cell)
File "/home/avb7119/PycharmProjects/shapespyer/shapes/basics/utils.py", line 331, in write_output
self._set_writer()
File "/home/avb7119/PycharmProjects/shapespyer/shapes/basics/utils.py", line 314, in _set_writer
raise RuntimeError(
RuntimeError: Unrecognised output format: 'config_SO4C12_smiles_azT.gro' [no extension => DL_POLY/DL_MESO CONFIG]
- Option
-fxzis not recognized (this option is supposed to be shared byshapeandsmiles):
smiles -i inp/smiles_SDS.sml -o conf_SO4C12 -x .gro -r SO4C12 --alignz --fxz
usage: smiles -i <INP> -o <OUT> -s <SHAPE> [options]
smiles: error: unrecognized arguments: --fxz
There might be more discrepancies in functionality of the original shape.py ... -s smiles and the refactored smiles - need to investigate and add more tests accordingly.