Forum Navigation
You need to log in to create posts and topics.

Bonds creation

Dear developers,

Currently when one wants to visualize bonds in Ovito, we have to specify a global cutoff radius or pair-wise cutoffs. It would be nice to have an automatic way to create bonds, for example based on the covalent radius of each chemical species.

Kind regards,

Benoit

Dear Benoit,

That's pretty much what we are actively working on right now. Our aim is to offer a parameter-free bond generation mode, which works on the basis of the chemical element information. It will be integrated into the Create Bonds modifier of OVITO but may additionally be available as an option of the file readers, so that creating bonds can already happen right during data import without any data pipeline modifier.

I would like to invite you to play around with this early preview build of OVITO Basic:

http://www.ovito.org/download/testing/ovito-basic-3.4.3-dev-HEAD-9ee3887-win64-bonds.exe
http://www.ovito.org/download/testing/ovito-basic-3.4.3-dev-HEAD-9ee3887-win64-bonds.zip
http://www.ovito.org/download/testing/ovito-basic-3.4.3-dev-HEAD-9ee3887-macos-bonds.dmg
http://www.ovito.org/download/testing/ovito-basic-3.4.3-dev-HEAD-9ee3887-x86_64-bonds.tar.xz

Here, the van der Waals radii of the chemical species are used as bond cutoff criterion. Specifically, 60% of the sum of the two VdW radii is taken as cutoff distance for the bond generation. Why? Because that is exactly how the VMD software does it, and we thought it makes most sense to adopt an established scheme instead of inventing our own one. But maybe you can recommend an even better choice for the bond criterion.

The VdW radius can be set by the user as a parameter of the particle type(s) (in addition to the conventional display radius), and is automatically initialized based on the recognized chemical species. The PDB, PDBx and Gromacs file readers provide the option to automatically generate bonds during file import.

I would appreciate your feedback on this question. Other visitors of this forum are invited to comment as well. Our aim is to make this important operation as convenient as possible for the OVITO users.

-Alex

Dear Alex,

Thanks a lot, this is indeed what I had in mind. I think it is fine to use the vdW radii of the chemical species to determine the cutoff distance. It could also be useful to be able to tune the factor (with a default value of 0.6 as in VMD). Other visualization tools such as XCrySDen use the covalent radii of the chemical species (multiplied by some factor > 1) to determine the bond cutoff but it should lead to a similar result.

I have tested the pre-build version and it seems to work fine, except that the information printed in the status bar (e.g. position and particle type) slighlty change the size of the viewport window. May be it is due to some special character that is not correctly displayed. So far, I have only tried with POSCAR files and it could also be convenient to generate bonds automatically at the import for this file format.

Kind regards,

Benoit

 

 

Hi Benoit,

Thank you for the feedback and suggestions.

Giving also the POSCAR file reader the capability to generate bonds during data import is something we are certainly going to do. Making the prefactor of 0.6 for the VdW cutoff criterion editable by the user is something we will think about some more. On one hand we don't want to burden normal users with too many parameters and options, and on the other hand there may be situations where advanced users would like to have additional control over things.

Regarding the status bar issue: This must be related to the recent changes introduced with OVITO 3.4.2 and should be fixed immediately. Can you please give me some hints that can help me reproduce the problem. Which operating system do you use? Did you make any changes to the system font settings? What is the system's screen scaling factor, which may be set to >100% for high-dpi displays to scale up texts and graphics. Perhaps you can even attach a screenshot of the OVITO window. Thanks.

-Alex

Dear Alex,

Concerning the status bar issue, I run Ovito on Windows 10 w/o any specific changes to the default configuration (except particle colors and radius). I have attached a screenshot of OVITO when the mouse is over an atom to display its position and particle type in the status bar. I have also tested with OVITO 3.4.2 as you suggested and I get the same problem.

Kind regards,

Benoit

 

 

Uploaded files:
  • Ovito-status-bar.png

Benoit,

Even though it doesn't occur on my Windows system, I've made some some changes to the status bar implementation with the aim of fixing this issue. Would you mind testing the following development build to verify that the problem is resolved? Thanks.

http://www.ovito.org/download/testing/ovito-basic-3.4.3-dev-HEAD-de2920c-win64-dev3.4.3.zip

-Akex

Dear Alex,

I just did the test with this new version and the problem seems indeed fixed in the sense that the size of the viewport doesn't change anymore. However, I have still the weird special character, probably instead of Angstrom?

Kind regards,

Benoit

One more try.

I discovered another invisible, zero-width unicode character in the string literal in the source code, which must have been responsible for this odd output in the status bar. Now it should be just a simple space between the number and the vertical separator bar (|).

http://www.ovito.org/download/testing/ovito-basic-3.4.3-dev-HEAD-fe5b4cc-win64-dev3.4.3.zip

Yes, the problem is now fixed in this last version! 🙂

新的OVITO微信频道!
New for our users in China: OVITO on WeChat 

Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.