ich sitze gerade an einem Code von einem Vorgänger von mir, der nicht mehr zu erreichen ist und verstehe hier einen Teil nicht, vielleicht kann mir das jemand erklären...
Code: Alles auswählen
for bond in bonds:
try:
atomcnt1 = my_atom_to_atom[bond[0]]
atomcnt2 = my_atom_to_atom[bond[1]]
bondtype = bond[2]
if atomcnt1 < atomcnt2:
mol2mol2.add_bond([atomcnt1, atomcnt2, bondtype])
else:
mol2mol2.add_bond([atomcnt2, atomcnt1, bondtype])
except:
print 'Warning from cavity2Mol2::_extract_info: Inter-residue bond wrong: ', bond[0], bond[1], bondtype
in der add_bond Methode wird nur die Liste an eine andere Liste angehängt.
Was versteh ich hier nicht?