OpenChemistry / avogadrolibs

Avogadro libraries provide 3D rendering, visualization, analysis and data processing useful in computational chemistry, molecular modeling, bioinformatics, materials science, and related areas.
https://two.avogadro.cc/
BSD 3-Clause "New" or "Revised" License
441 stars 168 forks source link

Allow user to set size of ghost atom #1714

Open matterhorn103 opened 2 weeks ago

matterhorn103 commented 2 weeks ago

Is your feature request related to a problem? Please describe. Sometimes a user might want to show a generic attachment point - coloured spheres in place of R1, R2 etc are all the rage in chemistry talks it seems.

Sometimes a user might want to depict a molecule bound to a nanoparticle or something else "blobby".

Describe the solution you'd like If the size of a ghost atom was customizable, that would provide a convenient way to create such depictions.

Describe alternatives you've considered Another option would be an additional atom type that is specifically designed to function as a "blob", but that seems unnecessary.

ghutchis commented 1 week ago

IIRC there are custom elements in there already for coarse-grained MD models. I think the element numbers go up to 255 (i.e. "customElement..." in elements.h / elements.cpp)

ghutchis commented 1 week ago

I guess the first step would be to modify molecule.h to have covalent and VdW radius methods for atom idx, which defaults to the static method in elements.h but could be set for custom elements.

I can provide some pointers to anyone interested in this.

Tharanishwaran commented 1 day ago

can i work on this issue ?