Skip to content

Conversation

@OOAAHH
Copy link

@OOAAHH OOAAHH commented Jan 12, 2026

Motivation

  • The previous mmCIF hydrogen filter used strlen(AtomName_uf[index_uf]) == 4 as an index, which evaluates to 0 or 1 and leads to incorrect character checks.
  • That bug caused some 4-character hydrogen atom names to be erroneously kept instead of being dropped.
  • For mmCIF input, all hydrogen atoms should be ignored to match the intended heavy-atom based algorithms.

Description

  • Replace the incorrect indexing expression with an explicit const char *atom_name and a clear check for hydrogen names.
  • Skip atoms whose name starts with 'H' or whose name is digit-prefixed with 'H' as the second character using isdigit((unsigned char)atom_name[0]) && atom_name[1] == 'H'.
  • Change applied to src/rnaview.c in the loop that parses _atom_site entries (around the existing hydrogen/water filtering block).

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

Successfully merging this pull request may close these issues.

1 participant