-
Notifications
You must be signed in to change notification settings - Fork 46
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
parse_pragma cannot handle #include in .itps files which are in #include in the top #554
Comments
I think this got discussed some time ago (as in, a few years ago), but I can't find the associated issue. If this is an important feature for you fixing it yourself and opening a PR will be by far the fastest :) |
The itp reader does not resolve If you are interested to read an itp file with #includes try the polyply topology parser as shown below. FYI you need a topology file, which means you at least need to define the
|
Hoi,
I would say if we don't want to fix it. We could change the error. If there
is an #include in the itp, it could be stated that this is not supported
and the data should be explicitly present.
Op do 19 okt. 2023 18:13 schreef Fabian Grunewald ***@***.***
…:
The itp reader does not resolve #includes at all and the reason is that
they are in fact rarely used in itp files. The Go model is really the only
exception. At the time we did not bother because it raised some other
questions like do we parse #defines and how to deal with these paragmas.
The new Go model implementation also completely gets rid of the include
files.
If you are interested to read an itp file with #includes try the polyply
topology parser as shown below. FYI you need a topology file, which means
you at least need to define the [molecules] directive at the end of the
file.
from polyply.src.topology import Topology
topology = Topology.from_gmx_topfile(name=name, path=toppath)
—
Reply to this email directly, view it on GitHub
<#554 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALLQB7YOLNBCVQPMZ4ULGDYAE7TBAVCNFSM6AAAAAA6G47AVWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGE4TKNZWGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hoi,
It seems like the ITP reader cannot handle nested includes in the included itps in the top file. This is used (a lot) in Go models and in any case is valid syntax. This issue is resolved if the content of the file which is included is copy pasted into the itp (instead of importing it). Therefore I am pretty certain it is a parsing error.
Cheers,
Bart
The text was updated successfully, but these errors were encountered: