Commit b3e7b75b authored by Christoph Ruegge's avatar Christoph Ruegge
Browse files

Repository split

This commit is the result of a history rewrite. Commit messages up to here may
not be entirely accurate, as they might refer to files that have been removed or
are now part of the other split repo (i.e. the Matlab version).

Changes include:

- Removal of *.mat from history
- Removal of generated files like *.pyc and Sphinx API reference
- Addition of .gitignore file
- Minor adjustments due to changed paths

*Not* included are modifications pertaining to references to the `inputdata`
directory, which is not, and should not be, part of the repository anymore. In
particular, the test suite fails in this commit due to missing input data. To
get a list of all source locations which have to be adjusted, use `git grep
inputdata`.
parent 4eea3099
*.pyc
*.egg-info
docs/Manual/autotoc/
_build
build
dist
...@@ -6,8 +6,8 @@ getting to the question. ...@@ -6,8 +6,8 @@ getting to the question.
1. You need to get your confidence up by running a demo in python. 1. You need to get your confidence up by running a demo in python.
So the first thing to do is open another X-terminal window and So the first thing to do is open another X-terminal window and
change directories to ...proxtoolbox/ProxPython (the same directory change directories to the same directory
you are reading this from). At the shell-prompt, type you are reading this from. At the shell-prompt, type
python3 python3
......
...@@ -5,7 +5,7 @@ Created on Tue Feb 9 15:12:47 2016 ...@@ -5,7 +5,7 @@ Created on Tue Feb 9 15:12:47 2016
@author: rebecca @author: rebecca
How to start: How to start:
open a terminal, go to the directory 'proxtoolbox.ProxPython' open a terminal, go to the ProxPython directory,
start ipython, then type 'run TestSuite/TestSuite_all' start ipython, then type 'run TestSuite/TestSuite_all'
""" """
......
...@@ -19,6 +19,7 @@ import subprocess as sp ...@@ -19,6 +19,7 @@ import subprocess as sp
import proxtoolbox.Utilities.Procrustes as procrustes import proxtoolbox.Utilities.Procrustes as procrustes
import sys import sys
import itertools import itertools
from shutil import which
#DTYPE = np.float64 #DTYPE = np.float64
#ctypedef np.float64_t DTYPE_t #ctypedef np.float64_t DTYPE_t
...@@ -88,6 +89,12 @@ class DRprotein: ...@@ -88,6 +89,12 @@ class DRprotein:
self.useRAAR(False) self.useRAAR(False)
self.setP2Type('default') self.setP2Type('default')
if not which('jmol'):
print(""" Warning: jmol not found in $PATH. Without Jmol, molecular images cannot be
viewed or saved. If you wish to view or saves images, please install Jmol from
http://jmol.sourceforge.net or via your distribution's package manager.
""")
def __del__(self): def __del__(self):
#sys.stdout.close() #sys.stdout.close()
self.logFileHandle.close() self.logFileHandle.close()
...@@ -545,14 +552,16 @@ class DRprotein: ...@@ -545,14 +552,16 @@ class DRprotein:
def saveJPG(self): def saveJPG(self):
self.drucken(" Saving JPG File ".center(80,"=")) self.drucken(" Saving JPG File ".center(80,"="))
jmolCmd = "java -jar Jmol.jar -n " + self.outputFile + " -w JPG:" + self.imageFile + " --exit" jmolCmd = ["jmol", "-n", self.outputFile, "-w", "JPG:" + self.imageFile, "--exit"]
#print jmolCmd try:
#self.drucken(commands.getoutput(jmolCmd)) self.drucken(sp.check_output(jmolCmd))
self.drucken(sp.check_output(jmolCmd),shell=True) #dangerous.... except sp.CalledProcessError as e:
self.drucken("") self.drucken(e.output.decode())
self.drucken("Error while calling Jmol: " + e)
self.drucken("")
def show(self): def show(self):
sp.call(['java','-jar','../jmol/Jmol.jar', self.outputFile]) sp.call(["jmol", self.outputFile])
#################################################################################################################### ####################################################################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment