Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mattwthompson opened this issue Jan 23, 2025 · 0 comments

Comments

@mattwthompson
Copy link
Member

          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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant