Right now, the read_conformers function in bin/ms_analysis.py has "head3.lst" hard-coded in the open call L316:
def read_conformers():
conformers = []
lines = open("head3.lst").readlines()
lines.pop(0)
for line in lines:
conf = Conformer()
conf.load_from_head3lst(line)
conformers.append(conf)
return conformers
I propose the following non-breaking fix:
def read_conformers(head3_path):
conformers = []
lines = open(head3_path).readlines()
lines.pop(0)
for line in lines:
conf = Conformer()
conf.load_from_head3lst(line)
conformers.append(conf)
return conformers
conformers = read_conformers("head3.lst")
Outcome of the change:
Users of the ms_analysis.py module can obtain the conformers list from head3.lst with a different path, yet the former behavior is unchanged.
Example:
import ms_analysis as msa
from pathlib import Path
mcce_dir = Path("some/path/to/MCCE/output/")
head3 = mcce_dir.joinpath("head3.lst")
# redo conformer loading with non-standard path:
conformers = msa.read_conformers(head3)
[...]
Right now, the
read_conformers
function inbin/ms_analysis.py
has "head3.lst" hard-coded in theopen
call L316:I propose the following non-breaking fix:
Outcome of the change: Users of the
ms_analysis.py
module can obtain the conformers list from head3.lst with a different path, yet the former behavior is unchanged. Example: