/** * Returns true if the 2 molecules of this interface are the same entity (i.e. homomeric interface), false * otherwise (i.e. heteromeric interface) * @return true if homomeric or if either of the entities is unknonw (null Compounds), false otherwise */ public boolean isHomomeric() { EntityInfo first = getParentChains().getFirst().getEntityInfo(); EntityInfo second = getParentChains().getSecond().getEntityInfo(); if (first==null || second==null) { logger.warn("Some compound of interface {} is null, can't determine whether it is homo/heteromeric. Consider it homomeric", getId()); return true; } return first.getRepresentative().getId().equals(second.getRepresentative().getId()); }