I would like to be able to specify an inter-nuclear axis as one of the Cartesian axes. This would help when interpreting a series of calculations where the outputs might be arbitrarily rotated. I could specify the axis, and use the center and align tools. Specifying some bond as a Cartesian axis would be one way to improve the consistency and professionalism of images generated via Avo2.
Yes, I havenât had a chance to port the align tool, which would allow you to specify an atom as the center, and another atom along one of the Cartesian axes. (In Avo2, this could be made into a script command as well.)
My hope was to finish that off this week - we need it in the group anyway.
Okay, I have a pull request that adds back the align tool, as well as two new script commands:
centerAtom
which expects an atom index
alignAtom
which expects a second atom index and an axis (e.g. âxâ)
I need to work on docs and examples, but it should get merged tomorrow. (Then back to work on the force fields.)
Not sure I am using the message passing right.
Iâve tried:
print("aligning atoms")
sendMessage("centerAtom", {"index": 3})
sendMessage("alignAtom", {"index": 12, "axis": "y"})
and
print(âaligning atomsâ)
sendMessage(âcenterAtomâ, {âidâ: 3})
sendMessage(âalignAtomâ, {âidâ: 12, âaxisâ: âyâ})
to no effect. Iâve inserted them into the MO generation script you shared. Iâm sure its just that I am misunderstanding how to use the commands. Could you correct my script?
Nope, itâs nothing youâre doing wrong.
I found a last night / today ⌠the script commands that I added to tools donât seem to connect. Script commands added to âextensionsâ (like the surface generation menu commands) work just great. But the align tool ⌠and code I added to the navigate tool to rotate / zoom the scene⌠nope.
Itâs going to drive me nuts. The tools get the signal, but nothing actually happens.
Since I want to get 1.98 out Really Soon Now⢠Iâll hack something together.
Ah, ok. That sounds good, I will keep playing with surface gen. I am going to leave a comment in that thread now to keep like with like.
Okay, it took like a month, but with the latest commits to both avogadroapp
and avogadrolibs
, the tools now get script commands. (The app was saving the tool before it ever got attached to the scene or the molecule.)
So yes, you now should be able to:
sendMessage("centerAtom", {"id": 3})
sendMessage("alignAtom", {"id": 12, "axis": "y"})