Bond
Use can control the bond using avr.bond.settings.
Delete bond pair
For example, we delete the bond between Ca and Ti, and Ti and Ca.
# delete the bond between Ca and Ti
del viewer.avr.bond.settings['Ti-Ca']
# change the bond color between Ti and O
viewer.avr.bond.settings['Ti-O'].update({"color": "red"})
# change the maximum bond length between Ti and O
viewer.avr.bond.settings['Ti-O']["max"] = 3.0
Add bond pair
# add the bond between Pt and Au
viewer.avr.bond.add_bond_pair('Pt', 'Au', max=3.2)
Hydrogen bond
The hydrogen bond can be controlled using avr.bond.show_hydrogen_bonds:
[1]:
from weas_widget import WeasWidget
from ase.io import read
atoms = read("../../examples/urea.cif")
viewer1 = WeasWidget()
viewer1.from_ase(atoms)
viewer1.avr.model_style = 1
viewer1.avr.show_hydrogen_bonds = True
viewer1
[1]: