create adjacency matrix from molecule