MolarVerse / PQAnalysis

PQAnalysis is a API/CLI python package for the analysis of MD simulations
https://molarverse.github.io/PQAnalysis/
MIT License
4 stars 2 forks source link

continue_input tool not working #83

Closed Lucky-Armin closed 4 months ago

Lucky-Armin commented 4 months ago

I have encountered an issue with the pqanalysis cli tool with the continue_input tool; the following command throws an error: pqanalysis continue_input <run-01.in>



         Input file key "rpmd_start_file" not defined in input file. 

ERROR:   PQAnalysis.PQInputFileReader - PQValueError 

         Actual n (68) and input file n (01) do not match. 
Traceback (most recent call last): 
 File "/home/ape/.conda/envs/pq/bin/pqanalysis", line 8, in &lt;module&gt; 
   sys.exit(main()) 
            ^^^^^^ 
 File "/home/ape/.conda/envs/pq/lib/python3.12/site-packages/PQAnalysis/cli/main.py", line 58, in main 
   sub_parser_dict[args.cli_command].run(args) 
 File "/home/ape/.conda/envs/pq/lib/python3.12/site-packages/PQAnalysis/cli/continue_input.py", line 8
8, in run 
   continue_input_file(args.input_file, args.number, input_format) 
 File "/home/ape/.conda/envs/pq/lib/python3.12/site-packages/decorator.py", line 232, in fun 
   return caller(func, *(extras + args), **kw) 
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
 File "/home/ape/.conda/envs/pq/lib/python3.12/site-packages/PQAnalysis/type_checking.py", line 113, i
n runtime_type_checking 
   return func(*args, **kwargs) 
          ^^^^^^^^^^^^^^^^^^^^^ 
 File "/home/ape/.conda/envs/pq/lib/python3.12/site-packages/PQAnalysis/io/api.py", line 63, in contin
ue_input_file 
   reader.continue_input_file(n) 
 File "/home/ape/.conda/envs/pq/lib/python3.12/site-packages/PQAnalysis/io/input_file_reader/pq/pq_inp
ut_file_reader.py", line 107, in continue_input_file 
   self.logger.error( 
 File "/home/ape/.conda/envs/pq/lib/python3.12/site-packages/PQAnalysis/utils/custom_logging.py", line
 215, in error 
   self._log(logging.ERROR, msg, args, exception=exception, **kwargs) 
 File "/home/ape/.conda/envs/pq/lib/python3.12/site-packages/PQAnalysis/utils/custom_logging.py", line
 154, in _log 
   raise exception(msg) # pylint: disable=broad-exception-raised 
   ^^^^^^^^^^^^^^^^^^^^ 
PQAnalysis.exceptions.PQValueError: Actual n (68) and input file n (01) do not match.```

[Slack Message](https://molarverse.slack.com/archives/C075KJ71LN4/p1717161092782549?thread_ts=1717161092.782549&cid=C075KJ71LN4)
97gamjak commented 4 months ago

So now this issue schould be fixed - the input file you gave is still not working yet. But the error message is now fixed to give the correct error why this is not possible (yet).