Re: [PyMOL] ModuleNotFoundError: No module named 'pymol._cmd'

2019-11-28 Thread Thomas Holder
Hi Markus,

You mention two directories, maybe you're running PyMOL from the wrong one?

/home/mheller/pymol-2.4/lib/python/pymol
/usr/local/Pymol-2.4/lib/python/Pymol


Cheers,
  Thomas


> On Nov 28, 2019, at 1:00 AM, Markus Heller  wrote:
> 
> Hi,
> 
> This is just an attempt to see if my issue has popped up before.
> 
> I have compiled open source Pymol 2.4, which I used for a few months now.  
> Today, the following error prevents launching Pymol:
> 
> 
> $ pymol
> Traceback (most recent call last):
>  File "/home/mheller/pymol-2.4/lib/python/pymol/__init__.py", line 64, in 
> 
>import pymol
>  File "/home/mheller/pymol-2.4/lib/python/pymol/__init__.py", line 564, in 
> 
>import pymol._cmd
> ModuleNotFoundError: No module named 'pymol._cmd'
> 
> 
> `/usr/local/Pymol-2.4/lib/python/Pymol` contains `cmd.py` and 
> `_cmd.cpython-36m-x86_64-linux-gnu.so`
> 
> I'm baffled as to why Pymol fails to open, as I'm not aware of any changes 
> made to my python setup or related.
> 
> I'd be very grateful for a slight nudge in the right direction ...
> 
> Thanks
> Markus
> 
> 
> 
> ___
> PyMOL-users mailing list
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> Unsubscribe: 
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.



___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] Autosave

2019-11-28 Thread Thomas Holder
It looks like strftime('%s') is not valid on Windows (it works fine for me on 
Linux and macOS). Here is an equivalent alternative that works on all platforms:

filename = '~/pymol-auto-save-{}.pse'.format(int(time.time()))
filename = os.path.expanduser(filename)

Binding a key is also easy. Here is an example which binds saving and rendering 
to the F1 key:

python
@cmd.set_key('F1')
def autosave_and_render():
filename = os.path.expanduser('~/pymol-auto-save.pse')
cmd.set('pse_binary_dump')
cmd.save(filename, quiet=0)
cmd.ray()
python end


Hope that helps.

Cheers,
  Thomas


> On Nov 22, 2019, at 11:48 PM, Junsu Park aka. Jason Mosier 
>  wrote:
> 
> Hello, I'm fairly new to pymol and python in general, but I honestly don't 
> have to self control to save by myself very well and so I was trying to use 
> the proof of concept code for autosaving. However, it was written for a way 
> old version of pymol and so I was wondering if I could get some help with 
> fixing this code up? If that would be too difficult, is there a way that I 
> could bind a key to saving AND then rendering? Or even just clicking on the 
> render button causes it to save before ray tracing? I keep rendering on a 
> weak computer thinking it can handle it and then it crashes and I lose all my 
> progress.
> 
> Link to code: https://pastebin.com/EJJQWc00  
> Link to output:  https://pastebin.com/TNSuA0fH
> 
> Thanks,
> -Jason
> ___
> PyMOL-users mailing list
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> Unsubscribe: 
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.



___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] Problem loading Amber trajectory

2019-11-28 Thread Thomas Holder
Hi Martin,

Would it be possible to share those files with me?

Thanks,
  Thomas

> On Nov 28, 2019, at 6:00 PM, Rosellen, Martin  
> wrote:
> 
> Dear all,
> 
> I have issues loading Amber trajectories. First, I load the the topology
> like this:
> 
> load WT.prmtop, WT, 1, top
> 
> output:
> 
>   ObjectMolecule: Attempting to read Amber7 topology file.
>   TOPStrToCoordSet: Warning: can't currently image a truncated octahedron...
> 
> 
> load_traj WT.trj, WT
> 
> output:
> 
> ObjMolLoadTRJFile-Error: Failed to read expected coordinate value.
>This traj. does not match the loaded parameter/topology file.
>Likely cause: either the atom count or the periodic box settings
>are inconsistent between the two files.
> 
> 
> My guess is that pymol somehow changes the atom count because it cannot
> image the truncated box which causes the error with the trajectory.
> 
> I was thinking about putting the trajectory in a PDB but that would be a
> file of <20GB in the end.
> 
> Any comment, positive or negative, would be very much appreciated.
> 
> cheers
> 
> Martin
> 
> 
> ___
> PyMOL-users mailing list
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> Unsubscribe: 
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.



___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

[PyMOL] Problem loading Amber trajectory

2019-11-28 Thread Rosellen, Martin
Dear all,

I have issues loading Amber trajectories. First, I load the the topology
like this:

load WT.prmtop, WT, 1, top

output:

   ObjectMolecule: Attempting to read Amber7 topology file.
   TOPStrToCoordSet: Warning: can't currently image a truncated octahedron...


load_traj WT.trj, WT

output:

ObjMolLoadTRJFile-Error: Failed to read expected coordinate value.
    This traj. does not match the loaded parameter/topology file.
    Likely cause: either the atom count or the periodic box settings
    are inconsistent between the two files.


My guess is that pymol somehow changes the atom count because it cannot
image the truncated box which causes the error with the trajectory.

I was thinking about putting the trajectory in a PDB but that would be a
file of <20GB in the end.

Any comment, positive or negative, would be very much appreciated.

cheers

Martin


___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

[PyMOL] ModuleNotFoundError: No module named 'pymol._cmd'

2019-11-28 Thread Markus Heller
Hi,

This is just an attempt to see if my issue has popped up before.

I have compiled open source Pymol 2.4, which I used for a few months now.  
Today, the following error prevents launching Pymol:


$ pymol
Traceback (most recent call last):
  File "/home/mheller/pymol-2.4/lib/python/pymol/__init__.py", line 64, in 

import pymol
  File "/home/mheller/pymol-2.4/lib/python/pymol/__init__.py", line 564, in 

import pymol._cmd
ModuleNotFoundError: No module named 'pymol._cmd'


`/usr/local/Pymol-2.4/lib/python/Pymol` contains `cmd.py` and 
`_cmd.cpython-36m-x86_64-linux-gnu.so`

I'm baffled as to why Pymol fails to open, as I'm not aware of any changes made 
to my python setup or related.

I'd be very grateful for a slight nudge in the right direction ...

Thanks
Markus



___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe