def _try_parse_formula(self, compound_id, s):
s = s.strip()<EOL>if s == '<STR_LIT>':<EOL><INDENT>return None<EOL><DEDENT>try:<EOL><INDENT>formula.Formula.parse(s)<EOL><DEDENT>except formula.ParseError:<EOL><INDENT>logger.warning('<STR_LIT>'.format(<EOL>compound_id, s))<EOL><DEDENT>return s<EOL>
Try to parse the given compound formula string.

        Logs a warning if the formula could not be parsed.