-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
def test_add_bond(): | ||
from weas_widget import WeasWidget | ||
from ase.build import bulk | ||
|
||
atoms = bulk("Al", cubic=True) | ||
atoms[0].symbol = "Cu" | ||
viewer = WeasWidget(from_ase=atoms) | ||
viewer.avr.show_bonded_atoms = True | ||
viewer.avr.model_style = 1 | ||
viewer.avr.boundary = [[-0.1, 1.1], [-0.1, 1.1], [-0.1, 1.1]] | ||
# add bonds | ||
viewer.avr.bond.settings["Al-Cu"] = { | ||
"specie1": "Al", | ||
"specie2": "Cu", | ||
"color1": viewer.avr.species.settings["Al"]["color"], | ||
"color2": viewer.avr.species.settings["Cu"]["color"], | ||
"min": 0, | ||
"max": 3, | ||
} | ||
len(viewer.avr.bond.settings) == 1 |