I have been working with GROMACS the past few months and want to be able to do some data analysis with GMX dielectric outputs. I tried using gmxvg to change my dipcorr.xvg file to a .csv so I can have easier manipulation of the data. Unfortunately I ran into an exception I don't understand. It is possible that this is a problem with my environment but I figured I would ask for help here.
I navigated to the proper directory and ran gmxvg, the directory only has 1 file in it. I was hit with the following exception:
`Traceback (most recent call last):
File "lib.pyx", line 2391, in pandas._libs.lib.maybe_convert_numeric
ValueError: Unable to parse string "&"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/justin/anaconda3/bin/gmxvg", line 8, in
sys.exit(xvgplot_cli())
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/init.py", line 6, in xvgplot_cli
_m.plot_cli()
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/GMXvg.py", line 358, in plot_cli
self.export_xvg(kwargs)
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/GMXvg.py", line 329, in export_xvg
self._plot_xvgs(self._find_gmxvg_files())
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/GMXvg.py", line 60, in _plot_xvgs
_result = self._plot_xvg(_xvg, kwargs)
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/GMXvg.py", line 186, in _plot_xvg
_df, _attributes = self.parse_xvg_table_attributes(_xvg)
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/GMXvg.py", line 164, in parse_xvg_table_attributes
_df = _df.apply(self.PD.to_numeric)
File "/home/justin/anaconda3/lib/python3.9/site-packages/pandas/core/frame.py", line 10374, in apply
return op.apply().finalize(self, method="apply")
File "/home/justin/anaconda3/lib/python3.9/site-packages/pandas/core/apply.py", line 916, in apply
return self.apply_standard()
File "/home/justin/anaconda3/lib/python3.9/site-packages/pandas/core/apply.py", line 1063, in apply_standard
results, res_index = self.apply_series_generator()
File "/home/justin/anaconda3/lib/python3.9/site-packages/pandas/core/apply.py", line 1081, in apply_series_generator
results[i] = self.func(v, *self.args, **self.kwargs)
File "/home/justin/anaconda3/lib/python3.9/site-packages/pandas/core/tools/numeric.py", line 232, in to_numeric
values, new_mask = lib.maybe_convert_numeric( # type: ignore[call-overload]
File "lib.pyx", line 2433, in pandas._libs.lib.maybe_convert_numeric
ValueError: Unable to parse string "&" at position 51`
I have tried cleaning up my python environment as well as reinstalling pandas however it continues to happen. Any help is appreciated.
I have been working with GROMACS the past few months and want to be able to do some data analysis with GMX dielectric outputs. I tried using gmxvg to change my dipcorr.xvg file to a .csv so I can have easier manipulation of the data. Unfortunately I ran into an exception I don't understand. It is possible that this is a problem with my environment but I figured I would ask for help here. I navigated to the proper directory and ran gmxvg, the directory only has 1 file in it. I was hit with the following exception: `Traceback (most recent call last): File "lib.pyx", line 2391, in pandas._libs.lib.maybe_convert_numeric ValueError: Unable to parse string "&"
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/justin/anaconda3/bin/gmxvg", line 8, in
sys.exit(xvgplot_cli())
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/init.py", line 6, in xvgplot_cli
_m.plot_cli()
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/GMXvg.py", line 358, in plot_cli
self.export_xvg(kwargs)
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/GMXvg.py", line 329, in export_xvg
self._plot_xvgs(self._find_gmxvg_files())
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/GMXvg.py", line 60, in _plot_xvgs
_result = self._plot_xvg(_xvg, kwargs)
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/GMXvg.py", line 186, in _plot_xvg
_df, _attributes = self.parse_xvg_table_attributes(_xvg)
File "/home/justin/anaconda3/lib/python3.9/site-packages/gmxvg/GMXvg.py", line 164, in parse_xvg_table_attributes
_df = _df.apply(self.PD.to_numeric)
File "/home/justin/anaconda3/lib/python3.9/site-packages/pandas/core/frame.py", line 10374, in apply
return op.apply().finalize(self, method="apply")
File "/home/justin/anaconda3/lib/python3.9/site-packages/pandas/core/apply.py", line 916, in apply
return self.apply_standard()
File "/home/justin/anaconda3/lib/python3.9/site-packages/pandas/core/apply.py", line 1063, in apply_standard
results, res_index = self.apply_series_generator()
File "/home/justin/anaconda3/lib/python3.9/site-packages/pandas/core/apply.py", line 1081, in apply_series_generator
results[i] = self.func(v, *self.args, **self.kwargs)
File "/home/justin/anaconda3/lib/python3.9/site-packages/pandas/core/tools/numeric.py", line 232, in to_numeric
values, new_mask = lib.maybe_convert_numeric( # type: ignore[call-overload]
File "lib.pyx", line 2433, in pandas._libs.lib.maybe_convert_numeric
ValueError: Unable to parse string "&" at position 51`
I have tried cleaning up my python environment as well as reinstalling pandas however it continues to happen. Any help is appreciated.