Troubleshooting
Diagnose format, query, and scientific-input problems without guessing.
A file does not read
Pass a path with a meaningful extension, or give a name= when reading bytes. MolFrame uses that information for format detection. Check that the file is actually PDB or mmCIF before treating an extension mismatch as malformed scientific data.
A query fails
Compile it in isolation with molframe.Query(query_text). The QueryError message quotes the query, underlines the problem, and says what to do:
import molframe
try:
molframe.Query("resnam HEM")
except molframe.QueryError as error:
print(error) # error[MOLFRAME-E4004]: unknown selection keyword ... keyword: resnamA query that fails with E4003 asks for data the file does not carry: backbone, sidechain, and ion need chemical component annotations. Write the backbone as protein and name N CA C O instead. See keywords that need extra data.
A query selects nothing
Run it alone and check len(structure.select(...)). Values are case-sensitive (resname HEM, not hem), and a QueryWarning names a value that does not occur in the structure. For mmCIF, chain is the author chain; label_chain is the archive's. Either can be named inside chain with a prefix: chain label:A or chain auth:A.
An analysis result is empty or indeterminate
Inspect the selection first: len(selection) and selection.to_coordinates().shape distinguish an empty query result from an unexpected coordinate shape. geometry.centroid() returns None for an empty coordinate set.
RMSD is surprising
RMSD does not infer atom correspondence. Ensure both arrays contain equivalent atoms in the same order, use the same model and conformer policy, and confirm that both shapes are (N, 3).
Rust symbol is unavailable
The Rust facade gates many analysis domains behind Cargo features. Enable the documented feature for the capability you are using, then rebuild. Python wheels ship the curated binding surface configured by the package build.