1234567891011121314151617181920212223openPrintfmoduleIntSet=BatSet.Inttypet={typ:string;(* atom's MOL2 type *)succs:IntSet.t}(* indexes of its direct successors (it is bonded to them) *)letcreatetypsuccs={typ;succs}letdummy=create""IntSet.emptyletadd_succ(n:t)(succ:int):t=createn.typ(IntSet.addsuccn.succs)letto_string(n:t):string=sprintf"%s %s"n.typ(MyList.to_stringstring_of_int(IntSet.to_listn.succs))letget_succs(n:t):IntSet.t=n.succsletget_typ(n:t):string=n.typ