Re: [PyMOL] Minimum mesh spacing

2019-05-02 Thread Thomas Holder
Hi Vatsal,

The "min_mesh_spacing" setting only affects the "mesh" representation of 
molecules (molecular surface). To increase the mesh density of an isomesh, you 
need to upsample the map with the "map_double" command.

https://pymolwiki.org/index.php/Map_Double

Hope that helps.

Cheers,
  Thomas

> On Apr 26, 2019, at 12:42 AM, Vatsal Purohit  
> wrote:
> 
> Hello,
> 
> I've been trying to use the minimum mesh spacing feature on pymol to make my 
> meshes more defined and it doesn't seem to do anything. 
> 
> I use .map.ccp4 files that I generated on ccp4 using .mtz files I generated 
> on phenix. Any suggestions on what I might be doing wrong and what I could do 
> to fix this would be really appreciated!
> 
> Regards,
> Vatsal 
> 
> -- 
> Vatsal Purohit
> 
> PhD Candidate, Stauffacher Lab, Dept. of Biology, Purdue University
> PULSe-Biophysics and Structural Biology training group
> vpur...@purdue.edu | 346-719-9409
> 
> ___
> 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] Electron density map color

2019-05-02 Thread Thomas Holder
Hi Vatsal,

This is how you show positive and negative contour:

fetch 1ubq, diffmap, type=fofc, async=0
isomesh diffmesh, diffmap, 3.0
color green, diffmesh
set mesh_negative_color, red
set mesh_negative_visible

Example copied from:
https://pymolwiki.org/index.php/mesh_negative_visible

Cheers,
  Thomas


> On Apr 26, 2019, at 12:37 AM, Vatsal Purohit  
> wrote:
> 
> Hello,
> 
> I've been trying to color my Fo-Fc electron density maps in pymol with the 
> positive Fo-Fc maps showing as green and negative Fo-Fc maps showing as red 
> and having no luck with it. They either show up as red or green.
> 
> I generate my maps by converting .mtz from phenix to .ccp4 files on ccp4. Any 
> suggestions about how I can try to color them individually this would be 
> greatly appreciated!
> 
> Regards,
> Vatsal
> 
> -- 
> Vatsal Purohit
> 
> PhD Candidate, Stauffacher Lab, Dept. of Biology, Purdue University
> PULSe-Biophysics and Structural Biology training group
> vpur...@purdue.edu | 346-719-9409
> 
> ___
> 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] monitor same protein conformational change with multiple trajectory files

2019-05-02 Thread Thomas Holder
Hi Yu and David,

I like to throw in one of the many ways to do this inside PyMOL :-)

from pymol import cmd
# load 3000 files into the "multi" object
for i in range(3000): cmd.load('file_{}.pdb'.format(i + 1), 'multi')
# if you want, fit to the first state
cmd.intra_fit('multi')

Morphing between each state is possible, but will take some time, and with the 
defaults you'll end up with 9 states, which might be more than PyMOL can 
handle (also you'll have a 50 minute movie).

As a proof of concept, here is how you make a linear (faster than rigimol) 
morph with 3 interpolated states between each consecutive input state, for the 
first 100 of your files (yields 495 states):

from pymol import cmd
for i in range(100): cmd.load('file_{}.pdb'.format(i + 1), 'multi')
cmd.intra_fit('multi')
cmd.morph('morph', 'multi', state1=0, state2=0, refinement=0, steps=5, 
method='linear')

Hope that helps.

Cheers,
  Thomas


> On May 1, 2019, at 3:36 PM, David Gae  wrote:
> 
> Dear  Yu,
> 
> Try this  bash script and then run "pymol all.pdb” in your PDB directory. 
> this might help you view your files as a trajectory. 
> 
> 
> for i in {1..3000}
> do
> # change frame_$i.pdb to your file name. for example mine is frame_1.pdb
> [ -f "frame_$i.pdb" ] 
> z=frame_$i.pdb
> sed  's/END/ENDMDL/g' $z > $z.r 
> { echo 'MODEL'; cat $z.r; } >$z.new
> 
> rm $z.r 
> done
> 
> cat *.new > all.pdb
> rm *.new
> -
> 
> I am sure there are many ways to do this inside pymol as well. you might want 
> to look up https://pymolwiki.org/index.php/Main_Page
> 
> hope this helps,
> David
> 
>> On Apr 30, 2019, at 5:57 PM, Yu Qi  wrote:
>> 
>> Some background: I'm an undergraduate student and am doing research with my 
>> professor about modeling protein conformational changes. I am new to this 
>> field and and am actively learning how to use command lines, python and 
>> other relative tools. I have simulated how the protein will walk with 
>> CAMPARI and have gotten back 3000 trajectory (pdb) files, my question is: 
>> how do I use PyMOL to make a movie by using those trajectory files? 
>> Basically, I want to know how to visualize how the protein moved from the 
>> first pdb file to the second, then to the third, etc.
>> 
>> I tried morphing two pdb files with one step from file_1.pdb to file_2.pdb, 
>> I aligned them first, then morphed them. I'm not sure how to go from there 
>> because I had a result file with 2 states and 2 frames, then when I tried to 
>> morph the result file with file_3.pdb, it did not work as I expected.
>> 
>> please let me know if you have questions, and I really appreciate the help.
>> 
>> Thank you for the help,
>> Yu
>> 
>> ___
>> 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-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] Performing backend calculations within PyMOL

2019-05-02 Thread Thomas Holder
Hi Ali,

I would typically use a temporary object for that, which is loaded into the 
work space but never rendered:

def intra_rms_tempobj(filename):
from pymol import cmd
tmpname = cmd.get_unused_name('_tmpobj')
cmd.load(filename, tmpname, zoom=0)
try:
return cmd.intra_rms(tmpname)
finally:
cmd.delete(tmpname)

It's also possible to create a new instance of the PyMOL backend, this is 
probably closer to what you were looking for:

def intra_rms_tempinstance(filename):
import pymol2
with pymol2.PyMOL() as p:
p.cmd.load(filename)
return p.cmd.intra_rms('*')

See also:
https://pymolwiki.org/index.php/Launching_From_a_Script#Independent_PyMOL_Instances_.28Context_Manager.29

Cheers,
  Thomas


> On May 3, 2019, at 2:24 AM, Ali Kusay  wrote:
> 
> I have noticed that PyMOL can be used to perform fast calculations by using 
> it in command line or through something like Jupyter notebook since it 
> doesn’t have to worry about the graphical geometries. I am curious if this 
> can be performed within the PyMOL program itself. For example, loading the 
> python interpreter in PyMOL and using it load a multistate object and 
> calculate RMSD through intra_fit without actually loading the object in the 
> work space. I would appreciate your help, this would be immensely time saving 
> for larger proteins while providing the convince of not having to leave the 
> program.
>  
> Kin regards,
>  
> Ali Kusay
> PhD student 
> ___
> 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] Performing backend calculations within PyMOL

2019-05-02 Thread Ali Kusay
I have noticed that PyMOL can be used to perform fast calculations by using it 
in command line or through something like Jupyter notebook since it doesn’t 
have to worry about the graphical geometries. I am curious if this can be 
performed within the PyMOL program itself. For example, loading the python 
interpreter in PyMOL and using it load a multistate object and calculate RMSD 
through intra_fit without actually loading the object in the work space. I 
would appreciate your help, this would be immensely time saving for larger 
proteins while providing the convince of not having to leave the program.

Kin regards,

Ali Kusay
PhD student
___
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