# prints mappings of positions (indices+1) of each molecule (before preprocess) to positions inside target (before preprocess, but the hydrogens are at the end anyway)
defprint_sols(Z,x,I):
SolCount=Z.SolCount
print("Target has size",n)
forsolnbinrange(SolCount):
print()
print("--------------------------------")
Z.setParam("SolutionNumber",solnb)
print("Solution number",solnb+1,", objective value (square rooted)",np.sqrt(Z.PoolObjVal))
forMindatabase_indices:
groups=[]
forGinrange(3):
ifsum([x[v].XnforvinIifv[2:]==(M,G)])>=1:
groups.append(G)
amount_picked=len(groups)
forkinrange(amount_picked):
G=groups[k]
m=len(data[targetname+"_amons_ncharges"][M])
label=data[targetname+"_amons_labels"][M]
ifk==0:
print("Molecule",label,"has been picked",amount_picked,"time(s) ( size",m,", used",sum([x[v].XnforvinIifv[2]==M]),")")