Skip to content

Commit 600305c

Browse files
authored
Merge pull request #48 from Luke2Sky/LucasMilitao
Fixed not using --directory argument when using mol2 files.
2 parents 7dee8c4 + 4ec541d commit 600305c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

scripts/multi_component_hydrogen_bond_propensity/multi_component_hydrogen_bond_propensity_report.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,15 +413,13 @@ def main(structure, work_directory, failure_directory, library, csdrefcode):
413413

414414
args = parser.parse_args()
415415
refcode = False
416-
416+
args.directory = os.path.abspath(args.directory)
417417
if not os.path.isfile(args.input_structure):
418418
if len(str(args.input_structure).split('.')) == 1:
419419
refcode = True
420420
else:
421421
parser.error('%s - file not found.' % args.input_structure)
422-
if not refcode:
423-
args.directory = os.path.dirname(os.path.abspath(args.input_structure))
424-
elif not os.path.isdir(args.directory):
422+
if not os.path.isdir(args.directory):
425423
os.makedirs(args.directory)
426424
if not os.path.isdir(args.coformer_library):
427425
parser.error('%s - library not found.' % args.coformer_library)

0 commit comments

Comments
 (0)