Skip to content
Permalink
5ab4ed8e4a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
24 lines (18 sloc) 684 Bytes
string = ""
pdb_ph_dict = {}
with open('./apo_o_cond.txt', 'r') as f:
for l in f:
pdb = l.strip().split(' ')[0].split('/')[-1]
pdb = pdb[:pdb.rfind('.')]
ph = float(l.strip().split(' ')[-1].strip())
pdb_ph_dict[pdb] = ph
with open('./AF3_apo_relaxed_cond.txt', 'r') as f:
for l in f:
pdb = l.strip().split(' ')[0].split('/')[-1]
pdb = pdb[:pdb.rfind('.')]
if pdb in list(pdb_ph_dict):
string += l.strip().split(' ')[0] + ' ' + str(pdb_ph_dict[pdb]) + '\n'
else:
string += l.strip().split(' ')[0] + ' 7.0\n'
with open('./AF3_apo_relaxed_cond_new.txt', 'w') as f:
f.write(string)