-
Notifications
You must be signed in to change notification settings - Fork 6
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
File tool #14
Comments
Thank you for the suggestion, I will add that in the next version. In the meantime, you can label atoms with their serial number, which will be one larger than ndx. To do so, you can use the "Index Labels" preset under Presets -> SEQCROW on the ChimeraX menu. You can also run If you're comfortable with Python, you can also have ChimeraX print the numbers to the log when you hover over an atom. The ChimeraX developers have some sample code for doing that here: https://rbvi.github.io/chimerax-recipes/hover/hover.html. You would want to print the "serial_number" attribute instead of the "scene_coord" shown in the sample. |
Hello, greetings and Happy Halloween Steffen |
Hello,
many thanks again for your help. My python is not so good ( i am willing to
learn) and so in have made a test rewriting the script:
def mouse_hover(trigger_name, pick):
from chimerax.atomic import PickedAtom
if isinstance(pick, PickedAtom):
atom = pick.atom
indi = atom.serial_number
message = f'Atom %s index %.2f' % (str(atom),indi)
session.logger.status(message, log = True)
session.triggers.add_handler('mouse hover', mouse_hover)
running the script gives the exact result but in addition some error
messages.
Message 1
Error processing trigger "mouse hover":
TypeError: not enough arguments for format string
File "C:\Users\wotan\OneDrive\Dokumente\chimerax-Alien2\hover2.py", line
10, in mouse_hover
message = f'Atom %s index %.2f' % (str(atom),indi)
See log for complete Python traceback.
and message 2
Error processing trigger "mouse hover":
TypeError: unsupported operand type(s) for +=: 'int' and 'str'
File "C:\Program
Files\ChimeraX1.6\bin\lib\site-packages\chimerax\core\logger.py", line 493,
in _log
msg += "\n"
See log for complete Python traceback.
Can you give me a hint about the problem or the solution?
Many thanks again\
St. Thomas
Am Fr., 27. Okt. 2023 um 01:26 Uhr schrieb Tony Schaefer <
***@***.***>:
… Thank you for the suggestion, I will add that in the next version.
In the meantime, you can label atoms with their serial number, which will
be one larger than ndx. To do so, you can use the "Index Labels" preset
under Presets -> SEQCROW on the ChimeraX menu. You can also run
label ##atoms atoms text "{0.serial_number}"
on the ChimeraX command line. This will label the atoms (atoms) of atomic
models (##atoms) with each of their serial numbers (text
"{0.serial_number}").
If you're comfortable with Python, you can also have ChimeraX print the
numbers to the log when you hover over an atom. The ChimeraX developers
have some sample code for doing that here:
https://rbvi.github.io/chimerax-recipes/hover/hover.html. You would want
to print the "serial_number" attribute instead of the "scene_coord" shown
in the sample.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGRL7ELXCY6HJIDIIS4QMQLYBLWS5AVCNFSM6AAAAAA6QWRCXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGA3DINRQGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Honestly, I'm not sure what's going on here. I tried this code, and I don't see any error messages. If you did some testing earlier, you might want to restart ChimeraX to clean out the older versions of the script. It looks like you're storing the script file in OneDrive. I've heard of people having nonsensical issues with scripts saved OneDrive or Dropbox folders. Usually it's like a 'permission denied' or 'file does not exist' type of error in those cases, but maybe try moving the script file somewhere else? One change I would suggest is to use |
Hello Tony,
many thanks for the help. Restart chimerax was the solution.
I do not have such experiences with onedrive, i use it for synchronising my data between university and home Office. But i think this can be a problem with so called virtual files. One drive remove the physical data from unused filles and replace this with this virtual files and if you use such a file again, onedrive has to load the real data first. (nextcloud do the same things). So many thanks for this hint. i will move the files in case of such an error to an other place.
with my best wishes
Steffen
…---------------------------------------------------------------------------------------------------------------
Dr. Steffen Thomas
dienstlich:
Universität Potsdam, Institut für Chemie
2. Stellvertreter der Vertrauensperson für Menschen mit Behinderungen
Tel. 0331 977 5197
e-mail ***@***.***
Privat/ HomeOffice
Fuchsbau 18
14797 Kloster Lehnin OT Lehnin
Tel. 03382 741432 // 0172 1595374
e-mail: ***@***.***
https://wissen.science-and-fun.de/
Am 09.11.2023 22:25:15 schrieb Tony Schaefer ***@***.***>:
Honestly, I'm not sure what's going on here. I tried this code, and I don't see any error messages. If you did some testing earlier, you might want to restart ChimeraX to clean out the older versions of the script.
It looks like you're storing the script file in OneDrive. I've heard of people having nonsensical issues with scripts saved OneDrive or Dropbox folders. Usually it's like a 'permission denied' or 'file does not exist' type of error in those cases, but maybe try moving the script file somewhere else?
One change I would suggest is to use message = 'Atom %s index %i' % (str(atom), indi) so the index is printed as an integer instead of a decimal number.
—
Reply to this email directly, view it on GitHub [#14 (comment)], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AGRL7EIXC24IN4WWSJKZWT3YDVC3XAVCNFSM6AAAAAA6QWRCXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBUG4YDOOBUGQ].
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Analysing an NMR calculation from Orca in ChimeraX is nice. But i can not easily assign the isotropic schift values for specific atoms. In the fiile tool i find a table weith shift, element, intensity und ndx. But no explanation what ndx mean.
Can zou add a row with atom name like C2 or H5. This can be helpful for analysing NMR calculations.
Thanks for your nice work
The text was updated successfully, but these errors were encountered: