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

coincided atoms handling #43

Merged
merged 4 commits into from
Jul 29, 2024
Merged

coincided atoms handling #43

merged 4 commits into from
Jul 29, 2024

Conversation

stan-donarise
Copy link
Contributor

fix #42

} )
hashes[ hash ] = render.atoms.length - 1
pos2els[ hash ] = [ crystal.atoms[ i ].symbol ]
const color = ($optimade_cifplayer_matinfio_chemical_elements.JmolColors as any)[ atom.symbol ] || '#FFFF00'
Copy link

@nin-jin nin-jin Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Лучше либо сузить типизацию atom.symbol до фиксированного набора значений, либо типизировать словарь, позволив принимать любые строки. Лучше первое, ибо набор химических элементов редко расширяется.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сделал любые строки

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

проблема в том, что химики любят придумывать свои условные "химические элементы", например, обозначения функциональных групп

@blokhin blokhin merged commit 4dfe534 into tilde-lab:master Jul 29, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Multiple atoms should not coincide (fall into each other) given the same positions
3 participants