Skip to content

Commit

Permalink
Treat ligands like H2S, NH3 as single-element for coloring purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
midlik committed Oct 17, 2024
1 parent 02dea71 commit 893ff6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Treat ligands like H2S, NH3 as single-element for coloring purposes

## [2.5.0] - 2024-08-20

- Updated Molstar version to 4.5.0
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function assignEntityAndUnitColors(structure: Structure) {
for (let i = 0; i < entities.data._rowCount; i++) {
const id = entities.data.id.value(i);
const typ = entities.data.type.value(i);
const elementSymbols = getElementsInChains(structure, entityInfo[id]?.chains ?? []);
const elementSymbols = getElementsInChains(structure, entityInfo[id]?.chains ?? []).filter(symbol => symbol !== 'H' && symbol !== 'D' && symbol !== 'T');
let color: Color | undefined;
if (typ === 'water') {
color = waterColor;
Expand Down

0 comments on commit 893ff6c

Please sign in to comment.