Hi, I'm a chemist trying to use the python script GaussSum.py with gnuplot for creating dataplots, and need some help. Whenever I try to produce a plot from the GaussSum GUI I get the error
sh: line 1: /Users/kristine/Desktop/GaussSum-1.0.5/gnuplot400/bin/wgnuplot.exe: No such file or directory
in my terminal. At the moment, I have gnuplot in the path /usr/local/bin instead. So I need to know how to change the settings directory to enable GaussSum to call gnuplot. Can anyone advise me on what or where to edit in the script please? I've pasted a section of the GaussSum.py where I'm guessing should be editted.
Thanks in advance! - def preferences(self):
-
# The Preferences Dialog Box
-
oldsettings=copy.deepcopy(self.settings) # Remember the old settings
-
d=PreferencesPopupBox(root,self.settings,title="Settings")
-
if self.settings!=oldsettings: # if there are any changes
-
self.saveprefs()
-
-
def saveprefs(self):
-
# Save the settings
-
appdata=os.getenv("HOME")
-
settingsfile=os.path.join(appdata,".GaussSum1.0","GaussSum.ini")
-
writeoutconfigfile(self.settings,settingsfile)
-
-
-
def readprefs(self):
-
# Check for GaussSum.ini in $HOME/GaussSum1.0 (XP)
-
# or $HOME/.gausssum1.0 (Linux)
-
-
appdata=os.getenv("HOME")
-
self.settings={}
-
-
if appdata==None: # Must not be a Windows machine!!
-
self.screen.write("Environmental variable HOME is not defined!\n\
-
I cannot continue, as I need HOME to know\
-
where to store GaussSum settings.\n")
-
else: # If everything is normal so far
-
settingsdir=os.path.join(appdata,".GaussSum1.0")
-
settingsfile=os.path.join(settingsdir,"GaussSum.ini")
-
-
if os.path.isfile(settingsfile): # Check for settings file
-
# Found it! - so read it in.
-
self.settings=readinconfigfile(settingsfile)
-
-
else: # Initialise the settings file (and directory)
-
if not os.path.isdir(settingsdir):
-
os.mkdir(settingsdir)
-
self.settings={'global settings.filetype':'Gaussian',
-
'global settings.gnuplot':os.path.join(sys.path[0],"gnuplot400","bin","wgnuplot.exe"),
-
'find.text1':'SCF Done',
-
'find.text2':'k 501%k502',
-
'find.text3':'imaginary',
-
'find.text4':'Framework',
-
'ir_raman.start':'0',
-
'ir_raman.end':'4000',
-
'ir_raman.numpoints':'500',
-
'ir_raman.fwhm':'3',
-
'mo.start':'-20',
-
'mo.end':'0',
-
'mo.fwhm':'0.3',
-
'uvvis.start':'300',
-
'uvvis.end':'800',
-
'uvvis.numpoints':'500',
-
'uvvis.fwhm':'3000',
-
'uvvis.sigma':'0.2',
-
'eddm.cubman':'C:\\Gaussian\\cubman.exe',
-
'eddm.formchk':'C:\\Gaussian\\formchk.exe',
-
'eddm.cubegen':'C:\\Gaussian\\cubegen.exe',
-
'nmr.data':os.path.join(settingsdir,"nmrdata.txt")
-
}
-
self.saveprefs() # Save the inital settings file
2 5341 bvdet 2,851
Expert Mod 2GB
I guess sometimes when having problems with Python stuff, so I will guess here. Have you tried to determine your current value of 'sys.path[0]? If it is '/Users/kristine/Desktop/GaussSum-1.0.5', you may try substituting your path here: - else: # Initialise the settings file (and directory)
-
if not os.path.isdir(settingsdir):
-
os.mkdir(settingsdir)
-
self.settings={'global settings.filetype':'Gaussian',
-
'global settings.gnuplot':os.path.join('usr', 'local', 'bin'),
-
.......
-
Sometimes I get lucky, but not usually the first time.
Looks like the key is here: -
def readprefs(self):
-
# Check for GaussSum.ini in $HOME/GaussSum1.0 (XP)
-
# or $HOME/.gausssum1.0 (Linux)
-
-
appdata=os.getenv("HOME")
-
My guess is that the since $HOME is /Users/kristine/Desktop/, you need the /GaussSum-1.0.5 directory there with /gnuplot400/bin/wgnuplot.exe in it.
If you don't want the directory there, look in the .gausssum1.0 file and change the path if it's in there.
Good luck,
Barton
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rama Calaga |
last post by:
Hi, I use both python and gnuplot a lot, but I am
unable to find a way to embed gnuplot "window/canvas" into tkinter. BLT option in
PMW is not so powerful and not so great, any suggestions ??
...
|
by: Jive |
last post by:
Here's my sitch:
I use gnuplot.py at work, platform Win32. I want to upgrade to Python 2.4.
Gnuplot.py uses extension module Numeric. Numeric is now "unsupported."
The documentation says "If...
|
by: Cousin Stanley |
last post by:
Experimenting with the gnuplot package under Debian Linux,
I've found that the -reverse option when used to start
gnuplot from the command-line will produce plots
that are color-reversed and...
|
by: syd |
last post by:
I don't even know where to begin. This is just bizarre. I just picked
up the Gnuplot.py module (a light interface to gnuplot commands) and
was messing around with it today.
I've got a tiny...
|
by: Joseph Suprenant |
last post by:
Hello all,
I have a C++ program, it does some calculations on things and then
prints out a file in the format in which GNUPLOT can use. So my question is
how would i call GNUPLOT from my C++...
|
by: Kamil Grymuza |
last post by:
Can anyone help me controlling gnuplot from my program? I can't use any
3rd party libraries or so. I found on the net, that i can be done via
pipes, but i don't know how to use them. All i need to...
|
by: Titi Anggono |
last post by:
Hi all,
I have some questions:
1. Can we use Tkinter for web application such as Java
?
2. I use gnuplot.py module for interfacing with
gnuplot in linux. Can we make the plot result shown in...
|
by: Nicola Kaiser |
last post by:
Hi,
I´m using Gnuplot via gnuplot.py and I´m looking for a way to get the
plotting output (terminal set to png in my case) piped in a string
instead of to stdout or a file.
Is there any...
|
by: cybervigilante |
last post by:
I can't seem to change the include path on my local winmachine no
matter what I do. It comes up as
includ_path .;C:\php5\pear in phpinfo() but there is no such file. I
installed the WAMP package...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |