Raise error for ligand pKa errors.
Fixes https://github.com/jensengroup/propka/pull/109#discussion_r532735233 per @orbeckst.
This commit is contained in:
@@ -163,23 +163,21 @@ class LigandPkaValues:
|
|||||||
[self.cxcalc, filename]+options.split(), stdout=subprocess.PIPE,
|
[self.cxcalc, filename]+options.split(), stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE).communicate()
|
stderr=subprocess.PIPE).communicate()
|
||||||
if len(errors) > 0:
|
if len(errors) > 0:
|
||||||
_LOGGER.error(
|
err = (
|
||||||
'***********************************************************'
|
f'***********************************************************'
|
||||||
'*********************************************')
|
f'*********************************************'
|
||||||
_LOGGER.error(
|
f'* Error: Marvin execution failed: '
|
||||||
'* Error: Marvin execution failed: '
|
f' *'
|
||||||
' *')
|
f'* {errors:<100s} *'
|
||||||
_LOGGER.error('* {0:<100s} *'.format(errors))
|
f'* '
|
||||||
_LOGGER.error(
|
f' *'
|
||||||
'* '
|
f'* Please edit the ligand mol2 file and re-run PropKa with '
|
||||||
' *')
|
f'the -l option: {filename:>29s} *'
|
||||||
_LOGGER.error(
|
f'***********************************************************'
|
||||||
'* Please edit the ligand mol2 file and re-run PropKa with '
|
f'*********************************************'
|
||||||
'the -l option: {0:>29s} *'.format(filename))
|
)
|
||||||
_LOGGER.error(
|
_LOGGER.error(err)
|
||||||
'***********************************************************'
|
raise OSError(err)
|
||||||
'*********************************************')
|
|
||||||
sys.exit(-1)
|
|
||||||
# extract calculated pkas
|
# extract calculated pkas
|
||||||
indices, pkas, types = self.extract_pkas(output)
|
indices, pkas, types = self.extract_pkas(output)
|
||||||
# store calculated pka values
|
# store calculated pka values
|
||||||
|
|||||||
Reference in New Issue
Block a user