mcocdawc / chemcoord

A python module for manipulating cartesian and internal coordinates.
GNU Lesser General Public License v3.0
72 stars 19 forks source link

Changing default viewer ignored #42

Closed Eldrad-Ulthran closed 7 years ago

Eldrad-Ulthran commented 7 years ago

As explained in the tutorial, the default viewer can be changed to e.g. pymol with cc.settings['defaults']['viewer'] = 'pymol'

However, running water.view() results in "file not found", because gv is not installed on my system.

Exception in thread Thread-1461: Traceback (most recent call last): File "/home/maxim/Programme/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/maxim/Programme/anaconda3/lib/python3.6/threading.py", line 864, in run self._target(*self._args, self._kwargs) File "/home/maxim/Programme/anaconda3/lib/python3.6/site-packages/chemcoord/cartesian_coordinates/_cartesian_clase subprocess.check_call([viewer, give_filename(i)]) File "/home/maxim/Programme/anaconda3/lib/python3.6/subprocess.py", line 286, in check_call retcode = call(*popenargs, *kwargs) File "/home/maxim/Programme/anaconda3/lib/python3.6/subprocess.py", line 267, in call with Popen(popenargs, kwargs) as p: File "/home/maxim/Programme/anaconda3/lib/python3.6/subprocess.py", line 707, in init restore_signals, start_new_session) File "/home/maxim/Programme/anaconda3/lib/python3.6/subprocess.py", line 1326, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'gv.exe'

water.view(viewer='pymol') works as supposed.

Output of cc.show_versions()

python: 3.6.1.final.0 python-bits: 64 OS: Linux OS-release: 4.13.2-1.g68f4aee-default machine: x86_64 processor: x86_64 LC_ALL: None LANG: de_DE.UTF-8 LOCALE: de_DE.UTF-8 chemcoord: 1.3.0 numpy: 1.12.1 scipy: 0.19.0 pandas: 0.20.1 numba: 0.33.0 sortedcontainers: 1.5.7 sympy: 1.0 pytest: 3.0.7 pip: 9.0.1 setuptools: 27.2.0 IPython: 5.3.0 sphinx: 1.5.6
mcocdawc commented 7 years ago

Thank you very much. It should work now. Just do git pull in the repository and reinstall the library with pip .

mcocdawc commented 7 years ago

If you want to keep this setting permanent, I recommend to have a look at: http://chemcoord.readthedocs.io/en/master/configuration.html