Reasoning about protein topology using the logic programming language PROLOG