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

Allow user to set size of ghost atom #1714

Open
matterhorn103 opened this issue Sep 16, 2024 · 7 comments
Open

Allow user to set size of ghost atom #1714

matterhorn103 opened this issue Sep 16, 2024 · 7 comments

Comments

@matterhorn103
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

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
Copy link

can i work on this issue ?

1 similar comment
@raunitpatel
Copy link

can i work on this issue ?

@Vineet1101
Copy link

@matterhorn103 Hi I would like to work on this issue can you tell me how to setup the project and explain a bit more about the issue

@ghutchis
Copy link
Member

ghutchis commented Dec 8, 2024

The build information is here: https://two.avogadro.cc/develop/build.html

For this one, it's actually fairly easy. There's some code in avogadro/core/elements.cpp. At the moment, all custom elements get the same radius (e.g. lines 29, 30).

So this one would require changing these to be std::vector similar to the code for CustomElementSymbols.

There's also some code between lines 233-250 that would need to change, and some methods added to set the radius of the custom elements (again similar to that for symbols).

So far, there isn't a pull request to implement the feature, so no it's not assigned or anything.

@Vineet1101
Copy link

@ghutchis alright I understood it thanks for explanation I will start right now working on it and will inform you once its done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants