Skip to content

Add examples of loading GROMACS topologies mixed with data from $GMXDATA #1151

Open
@mattwthompson

Description

          TOP files produced by GROMACS typically include ITP files distributed with GROMACS stored in `${GMXDATA}/top`. It might be worth attempting to load files from there if no local file can be found, eg something like:
                try:
                    included_file = open(itp_file)
                except FileNotFoundError as e:
                    included_file = open(f"{sys.env.get("GMXDATA", "")}/{itp_file}")
                with included_file as itp_obj:

I think in practice this won't actually allow many more TOP files to be loaded as they also mostly need #IFDEF...#ENDIF handling to deal with position restraints, but it'd be good future proofing.

Originally posted by @Yoshanuikabundi in #1120 (comment)

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