LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-17-2020, 09:25 AM   #1
chiendarret
Member
 
Registered: Mar 2007
Posts: 307

Rep: Reputation: 16
python script issues


With a python script found on GitHub (mep.py, revision 2019, which should build cube files for electrostatic potential from ORCA computations), code


Quote:
subprocess.check_call(["/gpfs/work/IscrC_agelA/RNA-agelA_7MB640_sphere20/QM-MM_crystal_orca_paired/0/orca_vpot", basename + ".gbw", basename + ".scfp",
at a mainframe raised error:

Quote:
File "/opt/anaconda3/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/francesco/tmp2/orca_vpot', 'qmmm_0.input.gbw', 'qmmm_0.input.scfp', 'qmmm_0.input_mep.inp', 'qmmm_0.input_mep.out']' died with <Signals.SIGSEGV: 11>
Sorry, while the code referes correctly to the mainframe, the error message refers from a different session on my laptop. The true error message from the mainframe (which tells the same issue) was
ORCA ELECTROSTATIC POTENTIAL GENERATION
------------------------------------------------------------------------------

GBW file ... qmmm_0.input.gbw
File with points to evaluate V(r) ... qmmm_0.input_mep.inp
Output file ... qmmm_0.input_mep.out

Reading the GBW file ... done
Reading the positions ... done (512000 positions)
Traceback (most recent call last):
File "mep.py", line 98, in <module>
basename + "_mep.inp", basename + "_mep.out"])
File "/cineca/prod/opt/compilers/python/3.6.4/none/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/gpfs/work/IscrC_agelA/RNA-agelA_7MB640_sphere20/QM-MM_crystal_orca_paired/0/orca_vpot', 'qmmm_0.input.gbw', 'qmmm_0.input.scfp', 'qmmm_0.input_mep.inp', 'qmmm_0.input_mep.out']' died with <Signals.SIGKILL: 9>.
I also tried with python2.6 on my laptop getting the same error. The path is correct.

the error message is obscure to me, grateful for advice
chiendarret

Last edited by chiendarret; 05-17-2020 at 10:08 AM.
 
Old 05-17-2020, 09:56 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The path is correct, of course, otherwise you would not get a segmentation violation, but an error to the effect that it can't be found.

Your problem is that /home/francesco/tmp2/orca_vpot crashes. Since I know exactly nothing about this program, this is all I can say.

You could try to launch the command from a shell prompt. Perhaps it has a verbose or debug flag that you can add. Perhaps it's a script, so that you can look into it. In any case, to understand why mep.py doesn't work, you need to find out why /home/francesco/tmp2/orca_vpot crashes on that computer.

EDIT: The Orca web site states
Quote:
Any problems that occur when running ORCA calculations should be submitted to the ORCA Forum.
I am sure you are in better hands there.

Last edited by berndbausch; 05-17-2020 at 09:59 AM.
 
Old 05-17-2020, 10:23 AM   #3
chiendarret
Member
 
Registered: Mar 2007
Posts: 307

Original Poster
Rep: Reputation: 16
orca_vpot was used as a standalone to generate, from ORCA QM computations, a list of partial atomic charges.

mep.py was asked now to use those charges to build the electrostatic maps.

Therefore, I suspect that the sigkill does not arise from problems related to orca_vpot, which was the reason why I posted here.

Anyway, I'll follow your advice to pose the question to ORCA.

By the way, I had to revise mep.py in order that it does not die immediately

thanks
 
Old 05-17-2020, 11:18 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
yes, it is not related to python at all. I would say the environment is not prepared correctly. But it is a guess only.
 
Old 05-18-2020, 02:49 AM   #5
chiendarret
Member
 
Registered: Mar 2007
Posts: 307

Original Poster
Rep: Reputation: 16
I had to revise mep.py, and likely not exhaustively. For example, the original 2019 version of mep.py has code
Quote:
def read_xyz(xyz):
atoms = list()
x = list()
y = list()
z = list()

with open(xyz) as fp:
# Skip the first two lines.
next(fp)
next(fp)
for line in fp:
data = line.split()
atoms.append(data[0])
x.append(float(data[1]))
y.append(float(data[2]))
z.append(float(data[3])
whereby mep.py dies immediately with python3. mep.py did not work even with python2.6, so that I revised next there

Quote:
def read_xyz(xyz):
atoms = []
x = []
y = []
z = []
f = open(xyz, "r")
f.readline()
f.readline()
for line in f:
data = line.split()
atoms.append(data[0])
x.append(float(data[1]))
y.append(float(data[2]))
z.append(float(data[3]))
and also elsewhere. That allowed mep.py to arrive at the crash that I posted previously.

Unfortunately, the ORCA forum is very little visited, and mep.py is not offered by ORCA officially.
Other (rare) free software to build electrostatic density maps also suffer from the problems of different python versions, and, unfortunately, as a biochemist, I lacked time to become a python expert. Such maps are of primary importance and commercial software does the job, but I have none.

All that merely to give a reason why I posted here, but I understand that one should exactly know what the code is asking to orca_vpot, which is not clear from the code.
thanks
 
Old 05-18-2020, 04:01 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
yes, again that is not related to the segmentation fault at all. You can try to execute the command without python (and constructed by python):
Code:
/home/francesco/tmp2/orca_vpot qmmm_0.input.gbw qmmm_0.input.scfp qmmm_0.input_mep.inp qmmm_0.input_mep.out
And you will see if it dies too.
Either the environment is incorrect or the input files contain something "strange"
 
Old 05-18-2020, 05:40 AM   #7
chiendarret
Member
 
Registered: Mar 2007
Posts: 307

Original Poster
Rep: Reputation: 16
Quote:
./orca_vpot qmmm_0.input.gbw qmmm_0.input.scfp qmmm_0.input_mep.inp qmmm_0.input_mep.out

ORCA ELECTROSTATIC POTENTIAL GENERATION
------------------------------------------------------------------------------

GBW file ... qmmm_0.input.gbw
File with points to evaluate V(r) ... qmmm_0.input_mep.inp
Output file ... qmmm_0.input_mep.out

Reading the GBW file ... done
Reading the positions ... done (512000 positions)
Segmentation fault
Behind a Segmentation Fault I am unable to see. I could suspect that 512000 positions are too much for the code, usually used for small molecules, but it is a mere suspicion. I tried to get a verbose output with "-v" before the out file but at no avail. I hope that ORCA will reply. It looks like a sleeping forum.

thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I got error while installing python-tk python-psycopg2 python-twisted saili kadam Linux - Newbie 1 09-05-2015 03:03 AM
[SOLVED] Python TypeError when calling Python program from a Bash script noppeli Programming 2 01-15-2013 08:06 AM
How to close open ports using a python script or a shell script in python ?? apanimesh061 Programming 3 11-20-2011 12:31 AM
Python related: How to access a Perl script behind a firewall from Python? vxc69 Programming 8 12-14-2010 07:32 AM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration