Skip to content

Bug in .bent file parsing #50

@jan-stevens

Description

@jan-stevens

Molecule names of the form <integer>M<suffix> (e.g. 10MG) are incorrectly parsed as a concentration value rather than a molecule name.

Error

Error: found 'concentration (10M)' expected ',', 'word "satisfies"', ...
     ╭─[ cytosol.bent:405:1 ]
     │
 405 │ 10MG  0.000064M   from "structures/metabolites/10MG.gro"     in cytosol
     │ ─┬─  
     │  ╰─── concentration (10M)

10MG should be parsed as a molecule name, not as the concentration 10M. The parser matches <integer>M as a concentration before attempting to match a molecule name, which breaks the .bent input file. This is a common naming convention in metabolite databases (e.g. 10MG for 10-methylguanine).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions