[Tutor] A Multiple Concatenation Problem
Stephen P. Molnar
s.molnar at sbcglobal.net
Sat Sep 19 14:52:31 EDT 2020
Thanks to help I've received from folks on this list I have gotten to a
place where I am well land truly stuck.
In a modeling problem that I have, I have a list of 31 ligands to which
I wish to attach a suffix . i.log where I runs from 1 to 10.
The list begins:
2-Phloroeckol
7-Phloroeckol plus 29 more names
The script, so far, is:
filename = 'Ligand.list'
file = open(filename,mode='r')
text = file.read()
file.close()
for suf in range(1, 11):
filename = f"{text}.{suf}.log"
The result is:
a list of the 32 ligands
a blank line
.10.log
Eventually in the script I'll get to a point where I use:
data = np.genfromtxt(fname, skip_header=28)
Affinity = (data[0, 1])
Which is exactly what I need to proceed further with the modeling.
However, until I get the correct output from the first portion of the
script I can get no further. I'm sure that I have missed something
fundamental, but I can't faind any references to a solution to the
problem. Quite frankly, I'm more that a bit embarrassed at this point.
Thanks in advance.
--
Stephen P. Molnar, Ph.D.
www.molecular-modeling.net
614.312.7528 (c)
Skype: smolnar1
More information about the Tutor
mailing list