Open hellhorse123 opened 5 months ago
How to implement the behavior: highlight a molecule and display information about all its atoms when you click on an atom in this molecule?
I guess what I need to use:
stage.signals.clicked.add((pickingProxy: any) => { if (pickingProxy && (pickingProxy.atom || pickingProxy.bond)) { const atom = pickingProxy.atom || pickingProxy.closestBondAtom; console.log(atom); // Update selected residues } });
but I don’t understand the implementation
Right, with this code atom will be a reference to an AtomProxy object. This object has many properties which are useful to get the element name, the corresponding residue and chain, etc...
atom
How to implement the behavior: highlight a molecule and display information about all its atoms when you click on an atom in this molecule?
I guess what I need to use:
but I don’t understand the implementation