Marta
13 November 2024 09:05
1
Hi,
During yesterday workshop about chemical shift perturbation analysis we had an issue with pymol.
We added, in external programs, the pymol executable path.
We had selected the corret file (tutorial file 1ubq.pdb) in the appearance tab and then used the molecular viewer button, but pymol gives us this error:
PyMOL™ 3.1.0 - Incentive Product
Copyright (C) Schrodinger, LLC
This Executable Build integrates and extends Open-Source PyMOL.
Detected OpenGL version 4.6. Shaders available.
Detected GLSL version 4.60.
OpenGL graphics engine:
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: NVIDIA GeForce GTX 1650/PCIe/SSE2
GL_VERSION: 4.6.0 NVIDIA 551.76
License Expiry date: 2025-06-01
Detected 12 CPU cores. Enabled multithreaded rendering.
PyMOL>run C:\Users\user\Downloads\CcpnUbiTitrationTutorial\CcpnUbiTitrationTutorial\UbiquitinTitrationPeaksPicked.ccpn\scripts\pymol\chemicalShiftMapping_Pymol_Template.py,main
Traceback (most recent call last):
File “C:\ProgramData\pymol\lib\site-packages\pymol\parsing.py”, line 474, in run
run_(path, ns_main, ns_main)
File “C:\ProgramData\pymol\lib\site-packages\pymol\parsing.py”, line 519, in run_file
execfile(file,global_ns,local_ns)
File “C:\ProgramData\pymol\lib\site-packages\pymol\parsing.py”, line 513, in execfile
co = compile(pi.file_read(filename), filename, ‘exec’)
File “C:\Users\user\Downloads\CcpnUbiTitrationTutorial\CcpnUbiTitrationTutorial\UbiquitinTitrationPeaksPicked.ccpn\scripts\pymol\chemicalShiftMapping_Pymol_Template.py”, line 12
cmd.load(‘C:\Users\user\Downloads\CcpnUbiTitrationTutorial\CcpnUbiTitrationTutorial\1ubq.pdb’)
^
SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape
thanks
Marta
LucaM
13 November 2024 10:07
2
can you open a fresh PyMol instance and just run the load command? Does it work?
Is this the latest PyMol version (3.1.0 at today)?
(just tested and worked fine on my system: PyMol 3.1; Analysis 3.2.10; MacOS 14.5)
Marta
13 November 2024 10:25
3
We tried to run the command (on our latest version of PyMOL, installed yesterday), but as an output it gives us this error:
PyMOL>cmd.load(‘C:\Users\user\Downloads\CcpnUbiTitrationTutorial\CcpnUbiTitrationTutorial\1ubq.pdb’)
File “toplevel”, line 1
cmd.load(‘C:\Users\user\Downloads\CcpnUbiTitrationTutorial\CcpnUbiTitrationTutorial\1ubq.pdb’)
^
SyntaxError: invalid character ‘‘’ (U+2018)
We also tried to eliminate the invalid character (') mentioned in the error, but it doesn’t run either.
LucaM
13 November 2024 10:31
4
It seams OS related. Are you on Windows?
Try with double backslashes:
- cmd.load(‘C:\\Users\\user\Downloads\\CcpnUbiTitrationTutorial\\CcpnUbiTitrationTutorial\\1ubq.pdb’)
or single foward slices
with raw string:
cmd.load(r‘C:\Users\user\Downloads\CcpnUbiTitrationTutorial\CcpnUbiTitrationTutorial\1ubq.pdb’)
Marta
13 November 2024 10:52
5
yes, we are on windows 11. it is working on pymol but when run from CCPNMR is giving the error as above mentioend
This is the command that is working well only on PyMOL
cmd.load(‘C:\Users\user\Downloads\CcpnUbiTitrationTutorial\CcpnUbiTitrationTutorial\1ubq.pdb’)
Thanks in advance
Best
Marta
LucaM
13 November 2024 11:00
6
Ok thanks will add that compatibility shortly.
Hi
When you cut and paste simple single quotes are getting replaced by left and right quotes by word or whatever and this is causing the error as python doesn’t respect them as quotes…
So the string needs to be surrounded by ‘’ not ‘’
cmd.load(r’C:\Users\user\Downloads\CcpnUbiTitrationTutorial\CcpnUbiTitrationTutorial\1ubq.pdb’)
Not
cmd.load(r‘C:\Users\user\Downloads\CcpnUbiTitrationTutorial\CcpnUbiTitrationTutorial\1ubq.pdb’)
Regards Gary
Dr Gary S Thompson NMR Facility Manager
CCPN CoI & Working Group Member
Wellcome Trust Biomolecular NMR Facility
School of Biosciences, Division of Natural Sciences
University of Kent, Canterbury, Kent, England, CT2 7NZ
:01227 82 7117
: g.s.thompson@kent.ac.uk
orchid: ORCID
though to be annoying all the quotes look the same after the forum e-mail handler has go to them…
so the bad quotes are
“‘” U+2018 Left Single Quotation Mark Unicode Character
and
“’” U+2019 Right Single Quotation Mark Unicode Character
and the good quote is
“'” U+0027 Apostrophe Unicode Character
see this page
Marta
13 November 2024 15:50
9
Thanks Gary,
we’ll try with your suggestions. Tomorrow I’ll send you a feedback
Marta
Marta
13 November 2024 16:00
10
We used the correct character (') and it works in pyMOL.
The problem is that ccpNMR is “not connected” with pyMOL.
Probably the two software do not communicate well
The passage from ccpnmr (after we load the pdb file) to pymol changes the characters and the last one doesn’t recognize the input.
The command is working well only on pymol
Marta