Show how to extract bonds from a file.
Show how to extract bonds from a file.
import RMF
def print_bonds(node, bf):
if bf.get_is(node):
bd = bf.get(node)
print("bond", bd.get_bonded_0(), bd.get_bonded_1())
else:
for c in node.get_children():
print_bonds(c, bf)
bf = RMF.BondFactory(fh)
print_bonds(fh.get_root_node(), bf)
FileConstHandle open_rmf_file_read_only(std::string path)