Re: [PyMOL] PovRay

2011-03-24 Thread Tsjerk Wassenaar
Hi Ian,

As this may be of broader interest, I forward it to the pymol user list too.

You can clip the scene using an intersection. Let's say that you have
the object you want to clip stored as a povray include file
"object.inc". Then you can get the clipped object as:

//###
pymol_object = union { #include "object.inc" }
clip = ...; // Here you need to fill in the 16th number from
get_view(), giving the distance of the front clipping plane
intersection { object { pymol_object } plane { z, -clip } }
//###

The plane could also be defined as plane{z,0 translate -clip} or,
along the same lines, as plane{z,0 rotate 30*y translate-clip}. Like
that you can have the clipping plane rotated.

Do note that such intersections are often very slow. Especially with
meshes (like surfaces) it is likely to be a pain (but potentially
yielding great imagery :)). With many separate objects, spheres in
particular, you can clip each of them separately, which is much
faster, especially if you use the directives 'bounded_by' and
'clipped_by'. For a sphere defined as

sphere{<0,0,0>, 1 pigment{color rgb 1}}

this means that you convert it to

intersection{
  sphere{<0,0,0>, 1}
  object{IntersectionObject}
  pigment{color rgb 1}
  bounded_by { sphere{<0,0,0>, 1} }
}

I would suggest scripting this... :)

Hope it helps, and good luck!

Cheers,

Tsjerk

On Thu, Mar 24, 2011 at 8:31 PM, Ian Slaymaker  wrote:
> Dear Tsjerk,
> I apologize for the elementary nature of my question, but I have spent quite
> some time wrestling with my rendering issues, and after solving most of
> them, a very small issue is blocking my progress. How do you get PovRay to
> read in the clipping plan of a pymol scene? I have tried a number of things,
> and nothing seems to work. Any help would be greatly appreciated. Thank you.
>
> Best,
> Ian
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


[PyMOL] Calling pymol from python - access to global variables

2011-03-29 Thread Tsjerk Wassenaar
Hi,

I'm having some trouble accessing a function defined at top level with
alter_state in a python script launching pymol. Maybe I shouldn't be
wanting to do this, but what I'm trying, and failing to do is
exemplified by this script:

###

#!/usr/bin/env python

import pymol

if __name__ == "__main__":
pymol.finish_launching()

def identity(x,y,z):
print "YEAH!"
return x,y,z

# Fix:
# setattr(pymol,"identity",identity)

pymol.editor.build_peptide("G")
pymol.cmd.alter_state(1,"all","(x,y,z)=identity(x,y,z)")

###

The problem is that the function 'identity' (which may be given a more
sensical form by actually doing something with the coordinates), is
sought in the pymol namespace. I can't really figure out where I
should be looking to directly call the function. Of course, I can
register the function in the pymol module (uncomment the setattr
line), but I don't think it's proper meddling with established modules
like that. Does anyone know a better/cleaner solution?

In addition, does anyone know how to suppress the GUI stuff when
launching pymol like this?

Groetjes,

Tsjerk

-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Newline character in labels

2011-03-29 Thread Tsjerk Wassenaar
Hi Andreas,

In the meantime, you can set double labels by using a pseudoatom,
labeling it with the second part, and placing the label at the spot
desired.

Cheers,

Tsjerk

On Wed, Mar 30, 2011 at 3:59 AM, Jason Vertrees
 wrote:
> Hi Andreas,
>
> This is currently not possible.  If this is a feature you'd like to
> see implemented, please go here http://pymol.org/contact and leave us
> a message.  It'll be tracked internally so we don't drop the ball if
> we decide to implement it.
>
> Cheers,
>
> -- Jason
>
> On Tue, Mar 29, 2011 at 12:03 PM, Andreas Spitzmüller
>  wrote:
>> Hi,
>> I'd like to label a couple of CA atoms in with their AA code, residue
>> number and b-factor. Since this gets a long label, I want to split it to
>> get two lines.
>> For example, if I have the CA atom of Asn124 with a b-factor of 36.2, I
>> want it to be labelled as follows:
>>
>>     Asn124
>>      36.2
>>
>> However, I cannot get the line break into the label! Is there any
>> possibility?
>>
>> I tried things like \n or unicode encoding u"\u000a" in combination with a
>> unicode font (label_font_id 15).
>> But I couldn't manage to get the label on two lines.
>>
>> Thanks for any hints!
>> Andreas
>>
>> PS: Please excuse if this message is posted twice, but it seems to me that
>> my first attempt didn't come through to you. (This is my first posting on
>> this list.)
>>
>> --
>> Enable your software for Intel(R) Active Management Technology to meet the
>> growing manageability and security demands of your customers. Businesses
>> are taking advantage of Intel(R) vPro (TM) technology - will your software
>> be a part of the solution? Download the Intel(R) Manageability Checker
>> today! http://p.sf.net/sfu/intel-dev2devmar
>> ___
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>
>
>
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrodinger, LLC
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>
> --
> Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers. Businesses
> are taking advantage of Intel(R) vPro (TM) technology - will your software
> be a part of the solution? Download the Intel(R) Manageability Checker
> today! http://p.sf.net/sfu/intel-dev2devmar
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Center of mass

2011-03-31 Thread Tsjerk Wassenaar
Hi Kanika,

You can also use pseudoatoms. If you have the positions:

pseudoatom coms,pos=[x1,y1,z1]
pseudoatom coms,pos=[x2,y2,z2]
bond coms,coms

Or, if you just have the chains:

pseudoatom coms, chain  a
pseudoatom coms, chain b
bond coms, coms

Alternatively you can use CGO objects. But pseudoatoms are more
versatile in this case.

Hope it helps,

Tsjerk

On Thu, Mar 31, 2011 at 12:12 PM, Ramiro Téllez Sanz
 wrote:
> If I'm not mistaken, you can select both center of masses, since they
> are independent objects in the right side bar, and save them together as
> a single pdb. Then, when loading this single pdb, you'll be able to draw
> the bond.
>
> Hope that helps.
>
>> This says that bond can only be added within an object not between 2
>> objects.
>
>
> --
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself;
> WebMatrix provides all the features you need to develop and
> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] RES: radius of gyration

2011-03-31 Thread Tsjerk Wassenaar
Hi :)

The radius of gyration is not that tough. Here's a python script to do
it in pymol. Do note that the hydrodynamic radius is something
related, but different.

from pymol import cmd
import math

def rgyrate(selection):
  # Get the atoms for the selection
  model=cmd.get_model(selection).atom
  # Extract the coordinates
  x=[i.coord for i in model]
  # Get the masses
  mass=[i.get_mass() for i in model]
  # Mass-weighted coordinates
  xm=[(m*i,m*j,m*k) for (i,j,k),m in zip(x,mass)]
  # Sum of masses
  tmass=sum(mass)
  # First part of the sum under the sqrt
  rr=sum(mi*i+mj*j+mk*k for (i,j,k),(mi,mj,mk) in zip(x,xm))
  # Second part of the sum under the sqrt
  mm=sum((sum(i)/tmass)**2 for i in zip(*xm))
  # Radius of gyration
  rg=math.sqrt(rr/tmass-mm)
  # Print it...
  print "Radius of gyration:", rg
  return rg

cmd.extend("rgyrate",rgyrate)

Hope it helps,

Tsjerk

On Thu, Mar 31, 2011 at 3:03 PM, Julio Cesar da Silva
 wrote:
> Dear Kanika,
>
>
>
> I do not know how to calculate the Rg using PyMOL. If it is possible, I
> would also like to know how. However, there are other possibilities.
>
> Do you have the pdb file of the molecule from what you want to calculate the
> radius of gyration? If so, you may use the program CRYSOL (download:
> http://www.embl-hamburg.de/biosaxs/crysol.html), which is used for
> comparison with SAXS data. When you run that program, you can search within
> the log file the parameter “Envelope Rg”. But, keep in mind that the program
> takes into account a solvation layer of about 3 Angstroms.
>
> You can also try the HydroPro program
> (http://leonardo.inf.um.es/macromol/programs/hydropro/hydropro.htm), which I
> believe that makes the Rg calculation, but I rarely use this program for
> that. I am sure that HydroPro can provide you the hydrodynamic radius, but I
> am not sure about the Rg.
>
>
>
> Regards,
>
> Julio
>
>
>
> De: kanika sharma [mailto:ksharma...@gmail.com]
> Enviada em: quinta-feira, 31 de março de 2011 14:46
> Para: pymol-users
> Assunto: [PyMOL] radius of gyration
>
>
>
> After going through the script library and tutorial, I couldn't find
> information about calculating the radius of gyration. Is this possible in
> pymol? And after this I want to generate a virtual cube around it of a
> specific length.
>
>
>
> Thanks,
>
> Kanika
>
> --
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself;
> WebMatrix provides all the features you need to develop and
> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
>
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Saving the Connolly surface of a PDB

2011-04-08 Thread Tsjerk Wassenaar
Hi Francois,

That information is in the view matrix you get from get_view. The
first nine numbers are the rotation matrix R. The next three numbers
are the camera position c, followed by the three numbers denoting
origin of rotation o. Then to transform your protein coordinates, as
in the PDB, to match up with your output from pymol, for each
coordinate x, you do:

y = R %*% (x - o) + c

where %*% denotes matrix multiplication.

Hope it helps,

Tsjerk

On Fri, Apr 8, 2011 at 11:02 AM, Francois Berenger  wrote:
> Jason Vertrees wrote:
>> Hi Francios,
>>
>> Someone recently asked about this and the answer was that this should
>> be a setting, but isn't currently available.  If I have time, I'll try
>> to sneak this in the upcoming PyMOL v1.4 release.
>
> Is there a workaround for the moment?
>
> For example, asking Pymol what is the current rotation
> and translation the model being displayed has undergone
> compared to the initial PDB that was read in?
>
> With such a possibility, it would allow one to
> know how to rigid body transform the input PDB
> in order to have it aligned with the surface Pymol is
> writing to a .obj file.
>
> Thanks a lot,
> Francois.
>
>> Cheers,
>>
>> -- Jason
>>
>> On Fri, Feb 25, 2011 at 3:05 AM, Francois Berenger  wrote:
>>> Hello,
>>>
>>> Is it possible to save the Connolly surface
>>> computed by Pymol without any rotation and translation
>>> added compared to the PDB from which the atom coordinates were read?
>>>
>>> I looked at the .obj file output and find there was some centering
>>> done and also some rotation added.
>>>
>>> Thanks a lot,
>>> F.
>>>
>>> --
>>> Free Software Download: Index, Search & Analyze Logs and other IT data in
>>> Real-Time with Splunk. Collect, index and harness all the fast moving IT 
>>> data
>>> generated by your applications, servers and devices whether physical, 
>>> virtual
>>> or in the cloud. Deliver compliance at lower cost and gain new business
>>> insights. http://p.sf.net/sfu/splunk-dev2dev
>>> ___
>>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>>
>>
>>
>>
>
>
> --
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] center of mass

2011-04-11 Thread Tsjerk Wassenaar
Hi Kanika, Jason,

cmd.get_legal_name is only called in 'com' if no object name is given.
The quickest workaround thus is to provide an object name for the
'com' object as third argument.

Of course, it still is wise to upgrade and benefit from all those cool
new features :)

Cheers,

Tsjerk

On Mon, Apr 11, 2011 at 8:57 AM, Jason Vertrees
 wrote:
> Hi Kanika,
>
> That version is too old, hence the missing command.  It's probably
> wise to upgrade.
>
> Cheers,
>
> -- Jason
>
>
>
> On Mon, Apr 11, 2011 at 2:50 AM, kanika sharma  wrote:
>> version 1.1 r1
>>
>> On Mon, Apr 11, 2011 at 12:04 PM, Jason Vertrees
>>  wrote:
>>>
>>> Hi Kanika,
>>>
>>> > I opened a file 1alu in pymol and ran script CenterOfMass.py. When I
>>> > gave
>>> > the command com 1alu, state=1, it displays a message
>>> >
>>> > AttributeError: 'module' object has no attribute 'get_legal_name'...
>>> > Iam unable to figure out why is this so.,
>>>
>>> It sounds like your PyMOL is out of date; that command is relatively
>>> new.  Which PyMOL  version are you using?
>>>
>>> Cheers,
>>>
>>> -- Jason
>>>
>>> --
>>> Jason Vertrees, PhD
>>> PyMOL Product Manager
>>> Schrodinger, LLC
>>>
>>> (e) jason.vertr...@schrodinger.com
>>> (o) +1 (603) 374-7120
>>
>>
>
>
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrodinger, LLC
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>
> --
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


[PyMOL] segmentation fault pymol 1.4 rev 3938

2011-04-11 Thread Tsjerk Wassenaar
Hi Jason,

I run into a segfault with Pymol 1.4 rev 3938 on my EEE PC, running
Ubuntu 9.04. The segfault occurs when loading the PDB file. It happens
regardless of the contents of the PDB file, but loading something with
hetatms gives some insight in how far it goes:

PyMOL>load ../../../3lzt.pdb
HEADERHYDROLASE   23-MAR-97   3LZT
TITLE REFINEMENT OF TRICLINIC LYSOZYME AT ATOMIC RESOLUTION
COMPNDMOL_ID: 1;
COMPND   2 MOLECULE: LYSOZYME;
COMPND   3 CHAIN: A;
COMPND   4 EC: 3.2.1.17;
COMPND   5 OTHER_DETAILS: NITRATE AND ACETATE IONS PRESENT
 ObjectMolecule: Read secondary structure assignments.
 ObjectMolecule: Read crystal symmetry information.
 Symmetry: Found 1 symmetry operators.
 ObjectMoleculeGuessValences(1,0): Unreasonable connectivity in heteroatom,
  unsuccessful in guessing valences.
Segmentation fault

If you need any information on libraries or such, let me know.

Best,

Tsjerk

-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] segmentation fault pymol 1.4 rev 3938

2011-04-11 Thread Tsjerk Wassenaar
Hi,

The problem did not occur on another machine (Intel Core i7, 64bit),
running Ubuntu 10.10.
On my EeePC loading a python CGO file worked fine, while loading an
empty PDB file segfaulted. So it seems to be related to loading the
coordinates, not to the displaying.

Cheers,

Tsjerk


On Mon, Apr 11, 2011 at 12:06 PM, Abhinav Verma  wrote:
> Hi Jason & Tsjerk ...
>  Just for the info that  I just downloaded, compiled and tried it on
> OpenSuse 11.4 and it ran without any problems:
>
> PyMOL>load ../../3lzt.pdb
> HEADER    HYDROLASE   23-MAR-97   3LZT
> TITLE REFINEMENT OF TRICLINIC LYSOZYME AT ATOMIC RESOLUTION
> COMPND    MOL_ID: 1;
> COMPND   2 MOLECULE: LYSOZYME;
> COMPND   3 CHAIN: A;
> COMPND   4 EC: 3.2.1.17;
> COMPND   5 OTHER_DETAILS: NITRATE AND ACETATE IONS PRESENT
>  ObjectMolecule: Read secondary structure assignments.
>  ObjectMolecule: Read crystal symmetry information.
>  Symmetry: Found 1 symmetry operators.
>  ObjectMoleculeGuessValences(1,0): Unreasonable connectivity in heteroatom,
>   unsuccessful in guessing valences.
>  CmdLoad: "../../3lzt.pdb" loaded as "3lzt".
>
> hth,
> abhi
>
>
> On Mon, Apr 11, 2011 at 9:43 AM, Tsjerk Wassenaar  wrote:
>>
>> Hi Jason,
>>
>> I run into a segfault with Pymol 1.4 rev 3938 on my EEE PC, running
>> Ubuntu 9.04. The segfault occurs when loading the PDB file. It happens
>> regardless of the contents of the PDB file, but loading something with
>> hetatms gives some insight in how far it goes:
>>
>> PyMOL>load ../../../3lzt.pdb
>> HEADER    HYDROLASE                               23-MAR-97   3LZT
>> TITLE     REFINEMENT OF TRICLINIC LYSOZYME AT ATOMIC RESOLUTION
>> COMPND    MOL_ID: 1;
>> COMPND   2 MOLECULE: LYSOZYME;
>> COMPND   3 CHAIN: A;
>> COMPND   4 EC: 3.2.1.17;
>> COMPND   5 OTHER_DETAILS: NITRATE AND ACETATE IONS PRESENT
>>  ObjectMolecule: Read secondary structure assignments.
>>  ObjectMolecule: Read crystal symmetry information.
>>  Symmetry: Found 1 symmetry operators.
>>  ObjectMoleculeGuessValences(1,0): Unreasonable connectivity in
>> heteroatom,
>>  unsuccessful in guessing valences.
>> Segmentation fault
>>
>> If you need any information on libraries or such, let me know.
>>
>> Best,
>>
>> Tsjerk
>>
>> --
>> Tsjerk A. Wassenaar, Ph.D.
>>
>> post-doctoral researcher
>> Molecular Dynamics Group
>> * Groningen Institute for Biomolecular Research and Biotechnology
>> * Zernike Institute for Advanced Materials
>> University of Groningen
>> The Netherlands
>>
>>
>> --
>> Xperia(TM) PLAY
>> It's a major breakthrough. An authentic gaming
>> smartphone on the nation's most reliable network.
>> And it wants your games.
>> http://p.sf.net/sfu/verizon-sfdev
>> ___
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] segmentation fault pymol 1.4 rev 3938

2011-04-11 Thread Tsjerk Wassenaar
Hey Jason,

Intel GMA 950 card, 945GSE chipset, check :(

So this is a known problem, and is there a workaround? Do you need
additional information from my side?

Cheers,

Tsjerk

On Mon, Apr 11, 2011 at 6:06 PM, Jason Vertrees
 wrote:
> Hi,
>
>> The problem did not occur on another machine (Intel Core i7, 64bit),
>> running Ubuntu 10.10.
>> On my EeePC loading a python CGO file worked fine, while loading an
>> empty PDB file segfaulted. So it seems to be related to loading the
>> coordinates, not to the displaying.
>
> Is anyone else having this problem?  We found and fixed a similar
> HETATM-related issue a few weeks ago.  PyMOL's HETATM bonding
> determination needs improvement.
>
> Tsjerk, can you please send me a stack trace.  Have you done a clean
> build?  Also, are your drivers up to date?  (Is this an Intel GMA 9x5
> video card?)
>
> Cheers,
>
> -- Jason
>
>> Cheers,
>>
>> Tsjerk
>>
>>
>> On Mon, Apr 11, 2011 at 12:06 PM, Abhinav Verma  
>> wrote:
>>> Hi Jason & Tsjerk ...
>>>  Just for the info that  I just downloaded, compiled and tried it on
>>> OpenSuse 11.4 and it ran without any problems:
>>>
>>> PyMOL>load ../../3lzt.pdb
>>> HEADER    HYDROLASE   23-MAR-97   3LZT
>>> TITLE REFINEMENT OF TRICLINIC LYSOZYME AT ATOMIC RESOLUTION
>>> COMPND    MOL_ID: 1;
>>> COMPND   2 MOLECULE: LYSOZYME;
>>> COMPND   3 CHAIN: A;
>>> COMPND   4 EC: 3.2.1.17;
>>> COMPND   5 OTHER_DETAILS: NITRATE AND ACETATE IONS PRESENT
>>>  ObjectMolecule: Read secondary structure assignments.
>>>  ObjectMolecule: Read crystal symmetry information.
>>>  Symmetry: Found 1 symmetry operators.
>>>  ObjectMoleculeGuessValences(1,0): Unreasonable connectivity in heteroatom,
>>>   unsuccessful in guessing valences.
>>>  CmdLoad: "../../3lzt.pdb" loaded as "3lzt".
>>>
>>> hth,
>>> abhi
>>>
>>>
>>> On Mon, Apr 11, 2011 at 9:43 AM, Tsjerk Wassenaar  wrote:
>>>>
>>>> Hi Jason,
>>>>
>>>> I run into a segfault with Pymol 1.4 rev 3938 on my EEE PC, running
>>>> Ubuntu 9.04. The segfault occurs when loading the PDB file. It happens
>>>> regardless of the contents of the PDB file, but loading something with
>>>> hetatms gives some insight in how far it goes:
>>>>
>>>> PyMOL>load ../../../3lzt.pdb
>>>> HEADER    HYDROLASE                               23-MAR-97   3LZT
>>>> TITLE     REFINEMENT OF TRICLINIC LYSOZYME AT ATOMIC RESOLUTION
>>>> COMPND    MOL_ID: 1;
>>>> COMPND   2 MOLECULE: LYSOZYME;
>>>> COMPND   3 CHAIN: A;
>>>> COMPND   4 EC: 3.2.1.17;
>>>> COMPND   5 OTHER_DETAILS: NITRATE AND ACETATE IONS PRESENT
>>>>  ObjectMolecule: Read secondary structure assignments.
>>>>  ObjectMolecule: Read crystal symmetry information.
>>>>  Symmetry: Found 1 symmetry operators.
>>>>  ObjectMoleculeGuessValences(1,0): Unreasonable connectivity in
>>>> heteroatom,
>>>>  unsuccessful in guessing valences.
>>>> Segmentation fault
>>>>
>>>> If you need any information on libraries or such, let me know.
>>>>
>>>> Best,
>>>>
>>>> Tsjerk
>>>>
>>>> --
>>>> Tsjerk A. Wassenaar, Ph.D.
>>>>
>>>> post-doctoral researcher
>>>> Molecular Dynamics Group
>>>> * Groningen Institute for Biomolecular Research and Biotechnology
>>>> * Zernike Institute for Advanced Materials
>>>> University of Groningen
>>>> The Netherlands
>>>>
>>>>
>>>> --
>>>> Xperia(TM) PLAY
>>>> It's a major breakthrough. An authentic gaming
>>>> smartphone on the nation's most reliable network.
>>>> And it wants your games.
>>>> http://p.sf.net/sfu/verizon-sfdev
>>>> ___
>>>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>>>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>>>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>>
>>>
>>
>>
>>
>> --
>> Tsjerk A. Wassenaar, Ph.D.
>>
>> post-doctoral researcher
>> Molecular Dynamics Group
>> * Gron

Re: [PyMOL] segmentation fault pymol 1.4 rev 3938

2011-04-13 Thread Tsjerk Wassenaar
Hey :)

After removing the svn source copy, as well as the pymol version
installed globally through apt-get, followed by downloading the source
anew and compiling, I ended up with a working copy. Apparently there
were some version conflicts...

The take home message: clean up before cooking :)

Cheers, and thumbs up for Jason!

Tsjerk

On Mon, Apr 11, 2011 at 2:03 PM, Tsjerk Wassenaar  wrote:
> Hi,
>
> The problem did not occur on another machine (Intel Core i7, 64bit),
> running Ubuntu 10.10.
> On my EeePC loading a python CGO file worked fine, while loading an
> empty PDB file segfaulted. So it seems to be related to loading the
> coordinates, not to the displaying.
>
> Cheers,
>
> Tsjerk
>
>
> On Mon, Apr 11, 2011 at 12:06 PM, Abhinav Verma  wrote:
>> Hi Jason & Tsjerk ...
>>  Just for the info that  I just downloaded, compiled and tried it on
>> OpenSuse 11.4 and it ran without any problems:
>>
>> PyMOL>load ../../3lzt.pdb
>> HEADER    HYDROLASE   23-MAR-97   3LZT
>> TITLE REFINEMENT OF TRICLINIC LYSOZYME AT ATOMIC RESOLUTION
>> COMPND    MOL_ID: 1;
>> COMPND   2 MOLECULE: LYSOZYME;
>> COMPND   3 CHAIN: A;
>> COMPND   4 EC: 3.2.1.17;
>> COMPND   5 OTHER_DETAILS: NITRATE AND ACETATE IONS PRESENT
>>  ObjectMolecule: Read secondary structure assignments.
>>  ObjectMolecule: Read crystal symmetry information.
>>  Symmetry: Found 1 symmetry operators.
>>  ObjectMoleculeGuessValences(1,0): Unreasonable connectivity in heteroatom,
>>   unsuccessful in guessing valences.
>>  CmdLoad: "../../3lzt.pdb" loaded as "3lzt".
>>
>> hth,
>> abhi
>>
>>
>> On Mon, Apr 11, 2011 at 9:43 AM, Tsjerk Wassenaar  wrote:
>>>
>>> Hi Jason,
>>>
>>> I run into a segfault with Pymol 1.4 rev 3938 on my EEE PC, running
>>> Ubuntu 9.04. The segfault occurs when loading the PDB file. It happens
>>> regardless of the contents of the PDB file, but loading something with
>>> hetatms gives some insight in how far it goes:
>>>
>>> PyMOL>load ../../../3lzt.pdb
>>> HEADER    HYDROLASE                               23-MAR-97   3LZT
>>> TITLE     REFINEMENT OF TRICLINIC LYSOZYME AT ATOMIC RESOLUTION
>>> COMPND    MOL_ID: 1;
>>> COMPND   2 MOLECULE: LYSOZYME;
>>> COMPND   3 CHAIN: A;
>>> COMPND   4 EC: 3.2.1.17;
>>> COMPND   5 OTHER_DETAILS: NITRATE AND ACETATE IONS PRESENT
>>>  ObjectMolecule: Read secondary structure assignments.
>>>  ObjectMolecule: Read crystal symmetry information.
>>>  Symmetry: Found 1 symmetry operators.
>>>  ObjectMoleculeGuessValences(1,0): Unreasonable connectivity in
>>> heteroatom,
>>>  unsuccessful in guessing valences.
>>> Segmentation fault
>>>
>>> If you need any information on libraries or such, let me know.
>>>
>>> Best,
>>>
>>> Tsjerk
>>>
>>> --
>>> Tsjerk A. Wassenaar, Ph.D.
>>>
>>> post-doctoral researcher
>>> Molecular Dynamics Group
>>> * Groningen Institute for Biomolecular Research and Biotechnology
>>> * Zernike Institute for Advanced Materials
>>> University of Groningen
>>> The Netherlands
>>>
>>>
>>> --
>>> Xperia(TM) PLAY
>>> It's a major breakthrough. An authentic gaming
>>> smartphone on the nation's most reliable network.
>>> And it wants your games.
>>> http://p.sf.net/sfu/verizon-sfdev
>>> ___
>>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>
>>
>
>
>
> --
> Tsjerk A. Wassenaar, Ph.D.
>
> post-doctoral researcher
> Molecular Dynamics Group
> * Groningen Institute for Biomolecular Research and Biotechnology
> * Zernike Institute for Advanced Materials
> University of Groningen
> The Netherlands
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] format problem

2011-04-25 Thread Tsjerk Wassenaar
Hi Kanika,

> alter_state 1, 1a8y_a, 1a8y,(x,y,z)=(-0.5*x + 0.886025*y, 0.886025*x +
>  0.5*y, -z)

This doesn't work like that. It should probably be

alter_state 1, 1a8y_a,(x,y,z)=(-0.5*x + 0.886025*y, 0.886025*x + 0.5*y, -z)

> then i saved the molecule in pymol from file-->save molecule-->1a8y_a.pdb

This worked for me as expected.

> The problem is that when i open the file as text file the format is improper
> since the space distribution is different from actual pdb files.
> I am saying this because i have to use this file to convert in tleap format
> and further use in a program. Is there any other way to save the molecule in
> pymol?

Can you give an example of where the spacing is wrong, e.g., post a
section from the original file and the corresponding section from the
new file?

Cheers,

Tsjerk


-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] format problem

2011-04-25 Thread Tsjerk Wassenaar
Hi Kanika,

No, the spacing, or in this case the lack of it, is correct. The
coordinate section of the pdb file is %8.3f%8.3f%8.3f, i.e. each
coordinate eight characters wide with three decimal precision.

Cheers,

Tsjerk


On Mon, Apr 25, 2011 at 12:28 PM, kanika sharma  wrote:
> i have attached a small section of the file after applying the matrix..
> the spacing between x,y and z axis is abnormal



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] ContactsNCONT script error

2011-05-25 Thread Tsjerk Wassenaar
Hi,

The first line is okay, but the rest seems to have an extra space,
indeed. You can remove it from the script using:

sed -i 's/^ //' script.py

Hope it helps,

Tsjerk

On Thu, May 26, 2011 at 4:33 AM, Michael Lerner  wrote:
> Hi Ivan,
> There's definitely a bug in that script. It looks like most of the file has
> one extra space of indentation. I don't feel comfortable changing it at the
> moment, as I'm not on a machine that has ccp4, but perhaps someone else can
> fix and test it. If not, I'll fix it tomorrow.
> Cheers,
> -Michael
> On Wed, May 25, 2011 at 7:35 PM, Campeotto, Ivan
>  wrote:
>>
>> Dear All,
>>
>>
>> I would like to compare the intermolecular crystal contacts in seven
>> crystal forms of the same enzyme.
>>  I produced a list of contacts for each crystal form using the program
>>  NCONT from CCP4 and I  found the ContactsNCONT script in the PyMOL Wiki
>> (http://www.pymolwiki.org/index.php/ContactsNCONT), which would save me a
>> lot of time.
>>  Unfortunately, when I run the ContactsNCONT script,  I always have the
>> following message with different PCs running  different OS (Windows, RedHat
>> or Mac):
>>
>> File "C:\Program Files\DeLano Scientific\PyMOL/modules\pymol\parser.py",
>> line 338, in parse
>>    parsing.run_file(path,self.pymol_names,self.pymol_names)
>>  File "C:\Program Files\DeLano Scientific\PyMOL/modules\pymol\parsing.py",
>> line 455, in run_file
>>    execfile(file,global_ns,local_ns)
>>  File "C:/Documents and Settings/Ivan/Desktop/ContactsNCONT.py", line 3
>>     def parseContacts( f ):
>>    ^
>>  IndentationError: unexpected indent
>>
>>
>> Any suggestion will be more than appreciated.
>>
>>
>> Thank you in advance,
>>
>> Regards
>>
>> Ivan Campeotto
>> Centre for Molecular Microbiology and Infection
>> Imperial College London
>>
>>
>> --
>> vRanger cuts backup time in half-while increasing security.
>> With the market-leading solution for virtual backup and recovery,
>> you get blazing-fast, flexible, and affordable data protection.
>> Download your free trial now.
>> http://p.sf.net/sfu/quest-d2dcopy1
>> ___
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>
>
>
> --
> Michael Lerner, Ph.D.
> IRTA Postdoctoral Fellow
> Laboratory of Computational Biology NIH/NHLBI
> 5635 Fishers Lane, Room T909, MSC 9314
> Rockville, MD 20852 (UPS/FedEx/Reality)
> Bethesda MD 20892-9314 (USPS)
>
> --
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Superimposing 2 or more Selections PyMOL GUI

2011-07-12 Thread Tsjerk Wassenaar
Hi Spyros,

In cases like these, I think it's usually best to use colours for the
selections and for the overlap:

color cyan, selection1
color yellow, selection2
color hotpink, selection1 and selection2

Hope it helps,

Tsjerk

On Tue, Jul 12, 2011 at 1:14 AM, Spyros Charonis  wrote:
> Hello PyMOLers,
> A visualization query:
> I have a PDB structure of a GPCR to which I have added two selections, one
> where I highlight certain motif sequences extracted from a database, and the
> second where I highlight a set
> of residues that bind ligands. Because I wish to determine if I can
> correlate the database motifs with ligand-binding residues, what I would
> like is some way of superimposing (if possible) one selection onto the
> other. I would color-code the selections (if possible, again) so that I
> could see if one was "on top" of the other in 3D or if they occur at
> different regions of the protein.
>  Creating selections the default way places pixel-size pink dots on the
> structure, so I was wondering if there is some way to control this for more
> complex visualization tasks?
> Is there a way to color-code my selections, and visualize them
> simultaneously on the structure to see if there is any overlap?
>
> Many thanks for your time!
> Spyros
> --
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] load multiple pdb files in pdb

2011-07-15 Thread Tsjerk Wassenaar
Hey Ram,

It's scriptable, but not very doable on this Android :p
The best solution would involve a generator funtion that takes a file
pattern and a number, using glob to expand the file list, and using yield at
each cycle.
For a pythonista that should make sense ;) I may take it up when I'm typing
with two hands again :)

Cheers,

Tsjerl

On Jul 15, 2011 7:40 PM, "r n"  wrote:

Hi
I wanted to load 100 pdbs from 2000 pdb files.

also is there way to load first 100 then second 200 etc.,?

Is there any command that could control the number of PDB to load to pymol
or script?

I did downloaded PDBDIR from pymol wiki, but not much help. It did hang up
for long time.

Is there any commands like pymol  c*.pdb, number=10 or file=10?

any immediate help will be appreciated.

thanks
ram



--
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] load multiple pdb files in pdb

2011-07-15 Thread Tsjerk Wassenaar
Hey Ram,

Okay, back on a normal keyboard. Managed even to misspell my own name!
Anyway, the solution is quite simple. But does require a bit of python
on the command line as explained below. First, make a script
'nload.py' with the following contents:

#--

import glob

def npdb(pattern="*.pdb",n=10):
pdblist = glob.glob(pattern)
for i in xrange(0,len(pdblist),n):
yield pdblist[i:i+n]

def nload(pattern="*.pdb",n=10):
for pdbNames in npdb(pattern,n):
for j in pdbNames:
cmd.load(j,object=j)
print "Loaded structures:\n","\n".join(pdbNames)
yield pdbNames

#---

Start pymol with the script as argument:

pymol nload.py

Then on the command line, type:

pdbiter=nload()

If you want to go through a specific set of pdb files or want to load
from a different directory, give an argument as you would on the unix
command line:

pdbiter=nload("/path/to/*.pdb")

The default is to take by tens, if you want to have a different
number, add an argument:

pdbiter=nload(n=25)

Neither of these seems to do much; they generate an object for
iteration, which has a method .next() for invoking a next cycle, i.e.,
loading the next set of structures. So type

pdbiter.next()

and do it again if you want the next set. Don't forget to delete the
objects that are loaded, unless you want to add the next set to it.
And maybe have a script at hand for setting the appearance after
loading. If you care to script things, invoking pdbiter.next() returns
the list of object names that are loaded.

I would suggest finding a Python tutorial, if you haven't done so
already. It will really allow you to get the most out of PyMOL.

Hope it helps,

Tsjerk



On Fri, Jul 15, 2011 at 9:56 PM, Marius Retegan
 wrote:
> You could try something like this in a terminal
>
> for i in $(seq 1 1 100); do pymol $i.pdb; done
>
> if your file name are 1.pdb, 2.pdb ... 100.pdb
>
> Marius
>
> On Fri, Jul 15, 2011 at 9:00 PM, Tsjerk Wassenaar  wrote:
>> Hey Ram,
>>
>> It's scriptable, but not very doable on this Android :p
>> The best solution would involve a generator funtion that takes a file
>> pattern and a number, using glob to expand the file list, and using yield at
>> each cycle.
>> For a pythonista that should make sense ;) I may take it up when I'm typing
>> with two hands again :)
>>
>> Cheers,
>>
>> Tsjerl
>>
>> On Jul 15, 2011 7:40 PM, "r n"  wrote:
>>
>> Hi
>> I wanted to load 100 pdbs from 2000 pdb files.
>>
>> also is there way to load first 100 then second 200 etc.,?
>>
>> Is there any command that could control the number of PDB to load to pymol
>> or script?
>>
>> I did downloaded PDBDIR from pymol wiki, but not much help. It did hang up
>> for long time.
>> Is there any commands like pymol  c*.pdb, number=10 or file=10?
>>
>> any immediate help will be appreciated.
>> thanks
>> ram
>>
>>
>>
>> --
>> AppSumo Presents a FREE Video for the SourceForge Community by Eric
>> Ries, the creator of the Lean Startup Methodology on "Lean Startup
>> Secrets Revealed." This video shows you how to validate your ideas,
>> optimize your ideas and identify your business strategy.
>> http://p.sf.net/sfu/appsumosfdev2dev
>> ___
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>
>> --
>> AppSumo Presents a FREE Video for the SourceForge Community by Eric
>> Ries, the creator of the Lean Startup Methodology on "Lean Startup
>> Secrets Revealed." This video shows you how to validate your ideas,
>> optimize your ideas and identify your business strategy.
>> http://p.sf.net/sfu/appsumosfdev2dev
>> ___
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
AppSumo Presents a FREE Video fo

Re: [PyMOL] Help

2011-08-01 Thread Tsjerk Wassenaar
Hi Babban,

For modeling the polymers you probably want to try a docking program.
Maybe HADDOCK suits your needs...

Hope it helps,

Tsjerk

On Sun, Jul 31, 2011 at 1:42 AM, Babban Mia  wrote:
> Dear users,
>
> Is there some program to calculate the zeta potential or streaming
> potential
> of protein molecules (PDB files )
>
> Is there some program to calculate the dipole moment of protein molecules
> at
> different PH values?
>
>
> My last doubt is about creating polymers out a given PDB ?
> I am studying the fibrils of some proteins and although the structure of
> fibril is not know but through some analysis I have come to understand the
> region in peptide which is leading to fibrillation.
> I want to be able to create a PDB which has like 4/8/16 monomeric peptide
> combined through some BETA PLEATED region(i.e the peptides will
> join/aggregate around that region (beta region) of the peptide ) and all I
> have is the PDB of the monomeric peptide.
> Is there a possibility to make such peptides in Pymol or something ? Please
> advise.
>
> Thanks for your help.
>
> Sincerely
>
> --
> Got Input?   Slashdot Needs You.
> Take our quick survey online.  Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] How to draw a cartoon representation on secondary structures containing beta-amino acids?

2011-08-16 Thread Tsjerk Wassenaar
Hey,

I noticed with coarse grained structures that cartoon_trace_atoms
really traces all atoms; you may need to restrict the selection:

set cartoon_trace_atoms
show cartoon, n. ca+cb

Hope it helps,

Tsjerk

On Wed, Aug 17, 2011 at 1:24 AM, Jason Vertrees
 wrote:
> Hi Baptiste,
>
>> My pymol version is the 0.99rc6 on windows 7, the graphic card on my laptop
>> is an ATI Mobility Radeon HD 5650. I'm trying to reproduce the
>> representation on the page 7 of this article (in copy).
>
> I looked at the file you sent and even tried some tricks to force it
> to work. However, that converted PDB file is unusable--it's too
> non-standard. PyMOL's really confused on connectivity, geometry, and
> numbering. For example, there're 146 atoms but only one residue. Can
> you please try fixing the file and try again? To give you an example
> of how badly arrange the file is try,
>
> set cartoon_trace_atoms
>
> show cartoon
>
> The atom trace is all over the place.
>
> I'm happy to revisit this if you can improve the file.
>
> Cheers,
>
> -- Jason
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrodinger, LLC
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>
> --
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] loading gro files

2011-08-18 Thread Tsjerk Wassenaar
Hey :)

Here is an all Python solution to load a .gro file, including the box
vectors. It simply converts to PDB format and calls cmd.read_pdbstr...
It supports multimodel files. I'll probably add a mechanism to
identify chains from breaks, as the .gro format does not use chain
identifiers, and may add gzip support. Later I'll also add MARTINI
coarse graining, while I'm at it :)

Hope it helps,

Tsjerk


###

from pymol import cmd
import math

_pdbline= "ATOM  %5i  %-3s %3s%2s%4i%8.3f%8.3f%8.3f%6.2f%6.2f
 %1s  \n"
_pdbBoxLine = "CRYST1%9.3f%9.3f%9.3f%7.2f%7.2f%7.2f P 1   1\n"

d2r = math.pi/180

def cos_angle(a,b):
p = sum([i*j for i,j in zip(a,b)])
q = math.sqrt(sum([i*i for i in a])*sum([j*j for j in b]))
return min(max(-1,p/q),1)

def norm2(a):
return sum([i*i for i in a])

def norm(a):
return math.sqrt(norm2(a))

def groBoxRead(a):
b = [10*float(i) for i in a.split()] + 6*[0] # Padding for rectangular boxes
return b[0],b[3],b[4],b[5],b[1],b[6],b[7],b[8],b[2]

def groAtom(a):
#012345678901234567890123456789012345678901234567890
#1PRN  N1   4.168  11.132   5.291
## ===> atom name,   res name,   res id,chain
x, y, z
return (a[10:15].strip(),a[5:10].strip(),int(a[:5]),"
",10*float(a[20:28]),10*float(a[28:36]),10*float(a[36:44]))

# Simple GRO iterator
def groFrameIterator(stream):
while True:
title = stream.readline()
natoms = stream.readline().strip()
if not natoms:
break
natoms = int(natoms)
atoms  = [groAtom(stream.readline())  for i in range(natoms)]
box= groBoxRead(stream.readline())
yield title, atoms, box

def pdbOut(atom,i=1):
return _pdbline%((i,) + (atom[0][:3],) + (atom[1],) + (atom[3],) +
(atom[2],) + atom[4:] + (1,40) + (atom[0][0],))

def pdbBoxString(box):
nu = math.sqrt(norm2(box[0:3]))
nv = math.sqrt(norm2(box[3:6]))
nw = math.sqrt(norm2(box[6:9]))

alpha = nv*nw == 0 and 90 or math.acos(cos_angle(box[3:6],box[6:9]))/d2r
beta  = nu*nw == 0 and 90 or math.acos(cos_angle(box[0:3],box[6:9]))/d2r
gamma = nu*nv == 0 and 90 or math.acos(cos_angle(box[0:3],box[6:9]))/d2r

return _pdbBoxLine %
(norm(box[0:3]),norm(box[3:6]),norm(box[6:9]),alpha,beta,gamma)

def gro(filename):
objname = filename[1+filename.rfind("/"):filename.rfind(".")]
pdb = []
model   = 1
for title, atoms, box in groFrameIterator(open(filename)):
pdb.append("MODEL %8d"%model)
pdb.append(pdbBoxString(box))
pdb.extend([pdbOut(atom,i) for atom, i in
zip(atoms,range(1,len(atoms)+1))])
pdb.append("ENDMDL")
model += 1
cmd.read_pdbstr("\n".join(pdb),objname)

cmd.extend("gro",gro)

###

On Wed, Aug 17, 2011 at 5:11 AM, Jason Vertrees
 wrote:
> Hi Michael,
>
> PyMOL knows about gromacs files, but needs to better handle .gro
> files, specifically. Currently you have to export to a PDB to read the
> topology.
>
> Please file this on the open-source tracker
> (https://sourceforge.net/tracker/?group_id=4546) and I'll get to it
> ASAP.
>
> Cheers,
>
> -- Jason
>
> On Mon, Aug 15, 2011 at 8:19 PM, Michael Daily  wrote:
>> Hi all,
>>
>> Is there a direct way to load a gromacs structure file (.gro) in PyMOL? I
>> know it's simple to convert them to pdb using editconf, but I want to load
>> gro files directly (as you can in vmd) because they permit higher max. atom
>> and residue numbers (100K vs. 10K for pdb) and permit longer residue names
>> (4 chars vs. 3 for vmd).
>>
>> Thanks,
>> Mike
>>
>> --
>> 
>> Michael D. Daily
>> Postdoctoral research associate
>> Pacific Northwest National Lab (PNNL)
>> 509-375-4581
>> (formerly Qiang Cui group, University of Wisconsin-Madison)
>>
>> --
>> uberSVN's rich system and user administration capabilities and model
>> configuration take the hassle out of deploying and managing Subversion and
>> the tools developers use with it. Learn more about uberSVN and get a free
>> download at:  http://p.sf.net/sfu/wandisco-dev2dev
>>
>> ___
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>
>
>
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrodinger, LLC
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>
> --
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> ___
> P

Re: [PyMOL] loading gro files

2011-08-18 Thread Tsjerk Wassenaar
Hi Joseph,

Sorry about that. A bit naive with the numbering. To fix it, change the function

def pdbOut(atom,i=1):
   return _pdbline%((i,) + (atom[0][:3],) + (atom[1],) + (atom[3],) +
(atom[2],) + atom[4:] + (1,40) + (atom[0][0],))

to

def pdbOut(atom,i=1):
stuff = 
[i%1e5,atom[0][:3],atom[1],atom[3],atom[2]%1e4]+list(atom[4:])+[1,40,atom[0][0]]
return _pdbline % tuple(stuff)

It worked for me on a .gro file with 160k atoms :)

Cheers,

Tsjerk

2011/8/18 Joseph André :
> Hi Tsjerk,
> Thanks for the script. It works great on my protein. However when I try to
> load the solvated system > 100.000 atoms I have problems with water
> molecules. Is it possible to handle gro files with more than 100.000 atoms
> and  residues?
> Best
>
> On Thu, Aug 18, 2011 at 9:39 AM, Tsjerk Wassenaar  wrote:
>>
>> Hey :)
>>
>> Here is an all Python solution to load a .gro file, including the box
>> vectors. It simply converts to PDB format and calls cmd.read_pdbstr...
>> It supports multimodel files. I'll probably add a mechanism to
>> identify chains from breaks, as the .gro format does not use chain
>> identifiers, and may add gzip support. Later I'll also add MARTINI
>> coarse graining, while I'm at it :)
>>
>> Hope it helps,
>>
>> Tsjerk
>>
>>
>> ###
>>
>> from pymol import cmd
>> import math
>>
>> _pdbline    = "ATOM  %5i  %-3s %3s%2s%4i    %8.3f%8.3f%8.3f%6.2f%6.2f
>>         %1s  \n"
>> _pdbBoxLine = "CRYST1%9.3f%9.3f%9.3f%7.2f%7.2f%7.2f P 1           1\n"
>>
>> d2r = math.pi/180
>>
>> def cos_angle(a,b):
>>    p = sum([i*j for i,j in zip(a,b)])
>>    q = math.sqrt(sum([i*i for i in a])*sum([j*j for j in b]))
>>    return min(max(-1,p/q),1)
>>
>> def norm2(a):
>>    return sum([i*i for i in a])
>>
>> def norm(a):
>>    return math.sqrt(norm2(a))
>>
>> def groBoxRead(a):
>>    b = [10*float(i) for i in a.split()] + 6*[0] # Padding for rectangular
>> boxes
>>    return b[0],b[3],b[4],b[5],b[1],b[6],b[7],b[8],b[2]
>>
>> def groAtom(a):
>>    #012345678901234567890123456789012345678901234567890
>>    #    1PRN      N    1   4.168  11.132   5.291
>>    ## ===> atom name,       res name,       res id,    chain
>> x,                 y,                 z
>>    return (a[10:15].strip(),a[5:10].strip(),int(a[:5]),"
>> ",10*float(a[20:28]),10*float(a[28:36]),10*float(a[36:44]))
>>
>> # Simple GRO iterator
>> def groFrameIterator(stream):
>>    while True:
>>        title = stream.readline()
>>        natoms = stream.readline().strip()
>>        if not natoms:
>>            break
>>        natoms = int(natoms)
>>        atoms  = [groAtom(stream.readline())  for i in range(natoms)]
>>        box    = groBoxRead(stream.readline())
>>        yield title, atoms, box
>>
>> def pdbOut(atom,i=1):
>>    return _pdbline%((i,) + (atom[0][:3],) + (atom[1],) + (atom[3],) +
>> (atom[2],) + atom[4:] + (1,40) + (atom[0][0],))
>>
>> def pdbBoxString(box):
>>    nu = math.sqrt(norm2(box[0:3]))
>>    nv = math.sqrt(norm2(box[3:6]))
>>    nw = math.sqrt(norm2(box[6:9]))
>>
>>    alpha = nv*nw == 0 and 90 or
>> math.acos(cos_angle(box[3:6],box[6:9]))/d2r
>>    beta  = nu*nw == 0 and 90 or
>> math.acos(cos_angle(box[0:3],box[6:9]))/d2r
>>    gamma = nu*nv == 0 and 90 or
>> math.acos(cos_angle(box[0:3],box[6:9]))/d2r
>>
>>    return _pdbBoxLine %
>> (norm(box[0:3]),norm(box[3:6]),norm(box[6:9]),alpha,beta,gamma)
>>
>> def gro(filename):
>>    objname = filename[1+filename.rfind("/"):filename.rfind(".")]
>>    pdb     = []
>>    model   = 1
>>    for title, atoms, box in groFrameIterator(open(filename)):
>>        pdb.append("MODEL %8d"%model)
>>        pdb.append(pdbBoxString(box))
>>        pdb.extend([pdbOut(atom,i) for atom, i in
>> zip(atoms,range(1,len(atoms)+1))])
>>        pdb.append("ENDMDL")
>>        model += 1
>>    cmd.read_pdbstr("\n".join(pdb),objname)
>>
>> cmd.extend("gro",gro)
>>
>> ###
>>
>> On Wed, Aug 17, 2011 at 5:11 AM, Jason Vertrees
>>  wrote:
>> > Hi Michael,
>> >
>> > PyMOL knows about gromacs files, but needs to better handle .gro
>> > files, specifically. Currently you have to export to a PDB to read the
>> > topology.
>> >
>> > Please file this on the open-source tracker
>> > (https://sourceforge.net/tracker/?gro

Re: [PyMOL] loading gro files

2011-08-18 Thread Tsjerk Wassenaar
Hi Michael,

Proteins are actually very easy, because of the fixed connectivity...
I'll post a few scripts soon to coarse grain a protein in Pymol, and
to fix/show the connectivity. I'll have to combine some things from
scriptlets here and there, though.

Cheers,

Tsjerk

On Thu, Aug 18, 2011 at 9:07 PM, Michael Lerner  wrote:
>
>
> On Thu, Aug 18, 2011 at 3:39 AM, Tsjerk Wassenaar  wrote:
>>
>> Hey :)
>>
>> Here is an all Python solution to load a .gro file, including the box
>> vectors. It simply converts to PDB format and calls cmd.read_pdbstr...
>> It supports multimodel files. I'll probably add a mechanism to
>> identify chains from breaks, as the .gro format does not use chain
>> identifiers, and may add gzip support. Later I'll also add MARTINI
>> coarse graining, while I'm at it :)
>
> Do you have a fairly complete Python library for parsing GROMACS topology
> files? I tend to write ad hoc scripts that add CONECT records to MARTINI
> models. It's easy to do that for lipid bilayers, but I'd love a more general
> solution that makes it easy to load proteins correctly.
> Cheers,
> -Michael
>
>>
>> Hope it helps,
>>
>> Tsjerk
>>
>>
>> ###
>>
>> from pymol import cmd
>> import math
>>
>> _pdbline    = "ATOM  %5i  %-3s %3s%2s%4i    %8.3f%8.3f%8.3f%6.2f%6.2f
>>         %1s  \n"
>> _pdbBoxLine = "CRYST1%9.3f%9.3f%9.3f%7.2f%7.2f%7.2f P 1           1\n"
>>
>> d2r = math.pi/180
>>
>> def cos_angle(a,b):
>>    p = sum([i*j for i,j in zip(a,b)])
>>    q = math.sqrt(sum([i*i for i in a])*sum([j*j for j in b]))
>>    return min(max(-1,p/q),1)
>>
>> def norm2(a):
>>    return sum([i*i for i in a])
>>
>> def norm(a):
>>    return math.sqrt(norm2(a))
>>
>> def groBoxRead(a):
>>    b = [10*float(i) for i in a.split()] + 6*[0] # Padding for rectangular
>> boxes
>>    return b[0],b[3],b[4],b[5],b[1],b[6],b[7],b[8],b[2]
>>
>> def groAtom(a):
>>    #012345678901234567890123456789012345678901234567890
>>    #    1PRN      N    1   4.168  11.132   5.291
>>    ## ===> atom name,       res name,       res id,    chain
>> x,                 y,                 z
>>    return (a[10:15].strip(),a[5:10].strip(),int(a[:5]),"
>> ",10*float(a[20:28]),10*float(a[28:36]),10*float(a[36:44]))
>>
>> # Simple GRO iterator
>> def groFrameIterator(stream):
>>    while True:
>>        title = stream.readline()
>>        natoms = stream.readline().strip()
>>        if not natoms:
>>            break
>>        natoms = int(natoms)
>>        atoms  = [groAtom(stream.readline())  for i in range(natoms)]
>>        box    = groBoxRead(stream.readline())
>>        yield title, atoms, box
>>
>> def pdbOut(atom,i=1):
>>    return _pdbline%((i,) + (atom[0][:3],) + (atom[1],) + (atom[3],) +
>> (atom[2],) + atom[4:] + (1,40) + (atom[0][0],))
>>
>> def pdbBoxString(box):
>>    nu = math.sqrt(norm2(box[0:3]))
>>    nv = math.sqrt(norm2(box[3:6]))
>>    nw = math.sqrt(norm2(box[6:9]))
>>
>>    alpha = nv*nw == 0 and 90 or
>> math.acos(cos_angle(box[3:6],box[6:9]))/d2r
>>    beta  = nu*nw == 0 and 90 or
>> math.acos(cos_angle(box[0:3],box[6:9]))/d2r
>>    gamma = nu*nv == 0 and 90 or
>> math.acos(cos_angle(box[0:3],box[6:9]))/d2r
>>
>>    return _pdbBoxLine %
>> (norm(box[0:3]),norm(box[3:6]),norm(box[6:9]),alpha,beta,gamma)
>>
>> def gro(filename):
>>    objname = filename[1+filename.rfind("/"):filename.rfind(".")]
>>    pdb     = []
>>    model   = 1
>>    for title, atoms, box in groFrameIterator(open(filename)):
>>        pdb.append("MODEL %8d"%model)
>>        pdb.append(pdbBoxString(box))
>>        pdb.extend([pdbOut(atom,i) for atom, i in
>> zip(atoms,range(1,len(atoms)+1))])
>>        pdb.append("ENDMDL")
>>        model += 1
>>    cmd.read_pdbstr("\n".join(pdb),objname)
>>
>> cmd.extend("gro",gro)
>>
>> ###
>>
>> On Wed, Aug 17, 2011 at 5:11 AM, Jason Vertrees
>>  wrote:
>> > Hi Michael,
>> >
>> > PyMOL knows about gromacs files, but needs to better handle .gro
>> > files, specifically. Currently you have to export to a PDB to read the
>> > topology.
>> >
>> > Please file this on the open-source tracker
>> > (https://sourceforge.net/trac

Re: [PyMOL] Coordinates of the mesh-points

2011-08-22 Thread Tsjerk Wassenaar
Hey Björn,

The mesh will be in Pymol camera coordinates, not in PDB coordinates.
You'll have to take the object_matrix (cmd.get_object_matrix) and
apply it to the protein to convert it to the same space if you are to
use it outside of Pymol.

Hope it helps,

Tsjerk

On Mon, Aug 22, 2011 at 8:12 PM, björn
 wrote:
> Hey,
>
> I have a little problem to get the points/coordinates of a mesh.
> I know he command:
> open("pymol.mesh","w").write( cmd.get_povray()[1] )
>
> But when I run this command, the coordinates of these spheres are not
> equal to these of the mesh.
>
> For example, if a generate the mesh for a protein and run this command, the 
> coordinates of the generated spheres are shifted by an axis I think.
>
> So my question is, is there a function where I can get the coordinates of the 
> SES-mesh in an easier way??
> Or do sombody know what my fault is, by running the above command?
>
> Thanks in advance,
> Björn
>
>
>
> --
> uberSVN's rich system and user administration capabilities and model
> configuration take the hassle out of deploying and managing Subversion and
> the tools developers use with it. Learn more about uberSVN and get a free
> download at:  http://p.sf.net/sfu/wandisco-dev2dev
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] pymolrc file on Windows7

2011-08-22 Thread Tsjerk Wassenaar
Hi Tanya,

Does it say more than "syntax error"? Can you send the whole output?
(copy crom the grey screen). In addition, can you send the pymolrc
file as attachment? There might be something to do with line endings;
so don't paste it in the mail, but attach the actual file that fails.

Cheers,

Tsjerk

On Tue, Aug 23, 2011 at 2:03 AM, Tatyana Sysoeva
 wrote:
>
> Dear all,
>
> I have quite silly question but I could not find an answer so far.
> I am trying to use Pymol in a Power point presentation. For that I would
> like to change the default setting in Pymol -
> set security, off
> I have created a file pymolrc and put it in C:/Program Files/PyMol/PyMol/.
> When I am launching Pymol, it reads the file, but respond with "syntax
> error".
> I checked and the same command is working properly if I type it directly
> into the Pymol prompt.
>
> I would appreciate any corrections or advices!
> Thank you very much,
> Tanya
>
>
> --
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Coordinates of a mesh

2011-08-25 Thread Tsjerk Wassenaar
Hi Bjoern,

Please do also give a more explicit account of what you want to
achieve in the end and what you've tried to get there, including the
commands used.

Cheers,

Tsjerk

2011/8/25 Troels Emtekær Linnet :
> Check this, and tell if it works.
>
> http://pymolwiki.org/index.php/Matrix_Copy
>
> Troels Emtekær Linnet
> Karl-Liebknecht-Straße 53, 2 RE
> 04107 Leipzig, Tyskland
> Mobil: +49 1577-8944752
>
>
> 2011/8/25 Bjoern-oliver Gohlke
> 
>>
>> The error I get is from the following command:
>> super 1A9U, mesh
>>  ExecutiveAlign: invalid selections for alignment.
>>
>> I think that the problem is that I try to align the mesh points with an
>> protein.
>> In my understanding, I need this one to run the get_object matrix command.
>> Or do I understand something in the wrong manner??
>>
>>
>> Zitat von Troels Emtekær Linnet :
>>
>>> Can you provide the error message?
>>>
>>>
>>>
>>> 2011/8/25 Bjoern-oliver Gohlke <
>>> bjoern-oliver.goh...@student.uni-tuebingen.de>
>>>
 Hi,

 I actual try to get the coordinates of the mesh from a
 protein/selection.

 At first I run the following command:
 open("pymol.mesh","w").write( cmd.get_povray()[1] )

 There I get points shifted by one axis or something like that.
 Then somebody here from the mailinglist tells me that I have to use
 cmd.get_object_matrix.
 I read in the Wiki how to use this command.
 (http://www.pymolwiki.org/index.php/Get_object_matrix)
 But when I try to run the example with my points and the protein I
 always get an error.
 Can sombody help me, or tell me what I do wrong??

 Thanks in advance,
 Björn




 --
 EMC VNX: the world's simplest storage, starting under $10K
 The only unified storage solution that offers unified management
 Up to 160% more powerful than alternatives and 25% more efficient.
 Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
 ___
 PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
 Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
 Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>>
>>
>
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] bbPlane script "SyntaxError: invalid syntax"

2011-08-25 Thread Tsjerk Wassenaar
Hi Adam,

Here's an alternative script... The command is pplanes (peptide-planes):

run triangles.py
pplanes selection[, color[, alpha[, state[, name

Hope it helps,

Tsjerk


On Thu, Aug 25, 2011 at 5:34 PM, H. Adam Steinberg  wrote:
> Hi all,
> Can anyone help me with a problem that I am having trying to run a python
> script?
> I am trying to run the bbPlane script from the PyMOLWiki
> 
> I have copied the script from the web page, to a plain text document, saved
> it as "bbPlane.py" but when I run it I get:
> 
> PyMOL>run bbPlane.py
> Traceback (most recent call last):
>   File "/Volumes/Port
> 3/software/MacPyMOL.app/pymol/modules/pymol/parser.py", line 332, in parse
>   File "/Volumes/Port
> 3/software/MacPyMOL.app/pymol/modules/pymol/parsing.py", line 455, in
> run_file
>   File "bbPlane.py", line 14
>
>      ^
>  SyntaxError: invalid syntax
> -
> script is here:
>
> #
> # -- bbPlane.py - draws a CGO plane across the backbone atoms of
> # neighboring amino acids
> #
> # Author: Jason Vertrees, 06/2010
> #   Modified by Thomas Holder, 06/2010
> #   Modified by Blaine Bell, 08/2011
> # Copyright (C) Schrodinger
> # Open Source License: MIT
> #
> from pymol.cgo import *# get constants
> from pymol import cmd, stored
> from chempy import cpv
>
> def bbPlane(objSel='(all)', color='white', transp=0.0):
> """
> DESCRIPTION
>
> Draws a plane across the backbone for a selection
>
> ARGUMENTS
>
> objSel = string: protein object or selection {default: (all)}
>
> color = string: color name or number {default: white}
>
> transp = float: transparency component (0.0--1.0) {default: 0.0}
>
> NOTES
>
> You need to pass in an object or selection with at least two
> amino acids.  The plane spans CA_i, O_i, N-H_(i+1), and CA_(i+1)
> """
> # format input
> transp = float(transp)
> stored.AAs = []
> coords = dict()
>
> # need hydrogens on peptide nitrogen
> cmd.h_add('(%s) and n. N' % objSel)
>
> # get the list of residue ids
> for obj in cmd.get_object_list(objSel):
> sel = obj + " and (" + objSel + ")"
> for a in cmd.get_model(sel + " and n. CA").atom:
> key = '/%s/%s/%s/%s' % (obj,a.segi,a.chain,a.resi)
> stored.AAs.append(key)
> coords[key] = [a.coord,None,None]
> for a in cmd.get_model(sel + " and n. O").atom:
> key = '/%s/%s/%s/%s' % (obj,a.segi,a.chain,a.resi)
> if key in coords:
> coords[key][1] = a.coord
> for a in cmd.get_model("(hydro or n. CD) and nbr. (" + sel + " and
> n. N)").atom:
> key = '/%s/%s/%s/%s' % (obj,a.segi,a.chain,a.resi)
> if key in coords:
> coords[key][2] = a.coord
>
> # need at least two amino acids
> if len(stored.AAs) <= 1:
> print "ERROR: Please provide at least two amino acids, the
> alpha-carbon on the 2nd is needed."
> return
>
> # prepare the cgo
> obj = [
> BEGIN, TRIANGLES,
> COLOR,
> ]
> obj.extend(cmd.get_color_tuple(color))
>
> for res in range(0, len(stored.AAs)-1):
> curIdx, nextIdx = str(stored.AAs[res]), str(stored.AAs[res+1])
>
> # populate the position array
> pos = [coords[curIdx][0], coords[curIdx][1], coords[nextIdx][2],
> coords[nextIdx][0]]
>
> # if the data are incomplete for any residues, ignore
> if None in pos:
> print 'peptide bond %s -> %s incomplete' % (curIdx, nextIdx)
> continue
>
> if cpv.distance(pos[0], pos[3]) > 4.0:
> print '%s and %s not adjacent' % (curIdx, nextIdx)
> continue
>
> # need to order vertices to generate correct triangles for plane
> #  modified/added by B.Bell 8/18/2011
> sumpos = cpv.add(pos[0], cpv.add(pos[1], cpv.add(pos[2], pos[3])))
> centerpos = [ sumpos[0]/4., sumpos[1]/4., sumpos[2]/4. ]
> angles = [ [ 0., 0 ] ]
> s00 = cpv.sub(pos[0], centerpos)
> for i in range(1,4):
> s = cpv.sub(pos[i], centerpos)
> ang = cpv.get_angle(s00, s)
> angles.append( [ ang, i] )
> def sortfirst(a, b):
> return cmp(a[0], b[0])
> angles.sort(sortfirst)
> verts = map(lambda x: x[1], angles)
> vorder = [ verts[0], verts[1], verts[2],
>verts[1], verts[3], verts[2] ]
> # fill in the vertex data for the triangles;
> for i in vorder:
> obj.append(VERTEX)
> obj.extend(pos[i])
>
> # finish the CGO
> obj.append(END)
>
> # update the UI
> newName =  cmd.get_unused_name("backbonePlane")
> cmd.load_cgo(obj, newName)
> cmd.set("cgo_transparency", transp, newName)
>
>
> cmd.extend("bbPlane", bbPlane)
>
> artforscience
> H. Adam Steinberg
> Artist, Scientist, Developmental Editor
> www.artfor

Re: [PyMOL] Multiple Structure Superposition

2011-08-28 Thread Tsjerk Wassenaar
Hi Suda,

Do you mean different structures of the same molecule or different
molecules? For a multistate object, there is intra_fit. for selections
comprising multiple objects it's not currently possible. But it's
being worked on.

Cheers,

Tsjerk

On Mon, Aug 29, 2011 at 8:43 AM, Suda Ravindran  wrote:
> Hi,
>
> I would like to know how to do structure based superposition using PyMol for
> 3 or more structures. Please help me out.
>
> Thanks,
>
> -Suda
>
> --
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] custom textures

2011-08-30 Thread Tsjerk Wassenaar
Hi Arne,

Unfortunately that is not possible. You could export the scene to
POV-Ray format and make the modifications there.

Cheers,

Tsjerk

On Tue, Aug 30, 2011 at 11:37 PM, Arne Dieckmann
 wrote:
> Hi all,
>
> I would be interested in creating custom textures for spheres in pymol. More 
> explicitely, I would like to draw two curved lines onto every sphere. Is 
> there any way I can that except placing CGO-objects on every atom?
>
>
> Thanks a lot,
> Arne
>
>
> --
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] how do I quick know the default value setting

2011-09-14 Thread Tsjerk Wassenaar
Hi Lina,

In most cases, you can set it back to default by setting it to -1.

To know what the default value is, you can use 'get setting_name', before
you start fiddling with the setting.

Hope it helps,

Tsjerk

On Sep 15, 2011 4:12 AM, "lina"  wrote:

Hi,

when I tried to set something,

let's say

set stick_radius, 0.5

found not ideal, and I wanna be back to default setting,

how do I check the default settings very quickly.

above just an example, not real case,

Thanks for any suggestions,

-- 
Best Regards,

lina



--
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] NUmber

2011-09-21 Thread Tsjerk Wassenaar
Hi Suda,

Do you mean the number of residues in helix c.q. sheet or the number
of helices and the number of sheets? The former is pretty easy. You
can do

select ss s
select ss h

to get the numbers for sheet and helices, respectively. To use the
numbers in a script, use cmd.select('ss s') and cmd.select('ss h')
instead.

The other way is not as easy. You'll have to get the sequence:

cmd.dss()
ss = "".join([i.ss for i in cmd.get('n. ca').atom])

and then parse the sequence for stretches of identical types. In the
case of helices, that will give you the answer, but sheets are
typically composed of multiple strands, which will require additional
effort.

Hope it helps,

Tsjerk

On Wed, Sep 21, 2011 at 5:47 AM, Suda Ravindran  wrote:
> Hi,
>
> I would like to know if there is any option in PyMol to count the number of
> helices and sheets present in the structure.
>
> Please help me out..
>
> -Suda
>
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Automating pymol through PERL

2011-09-29 Thread Tsjerk Wassenaar
Hi Anasuya,

This sound like one of those very good reasons to have a go at Python,
and leave Perl behind... Together with all the plain reasons to leave
Perl behind :) First of all, check http://xkcd.com/353/

Assuming the file is called list.txt and you have all pdb files at
hand (which is not strictly necessary, as PyMOl can download them for
you), make a file called process.py with the following content



from pymol import cmd

def process_line(x):
  pdbid,res,chain,num = x.split()
  cmd.load(pdbid+".pdb")
  cmd.select("zone1","byres all within 4.5 of (chain %s and resn %s
and resi %s)"%(chain,res,num))
  cmd.select("zone2","(byres all within 4.5 of zone1) and not zone1)")
  cmd.save("%s-%s-%s-%s-zone1.pdb"%(pdbid,res,chain,num),zone1)
  cmd.save("%s-%s-%s-%s-zone2.pdb"%(pdbid,res,chain,num),zone2)
  cmd.delete(pdbid)

def process_all(filename):
  for line in open(filename):
process_line(line)

process_all("list.txt")


#==

After saving the file, do

pymol -c process.py

And that's it. Unless I made an error somewhere :P I haven't actually
tested this. But the proper solution should lie along these lines :)

Hope it helps,

Tsjerk
On Thu, Sep 29, 2011 at 8:58 AM, Anasuya Dighe
 wrote:
> Hello,
> I have a .txt file which has data in the following fashion:
>
>          19gs BSP A 1
>          1a2d PYX A 117
>          9rsa ADU A 125
>          7kme PRR J 382
>          1a0r ACE B 1
>          1a0r FAR G 72
>          .
>          .
>          .
>
> Fields:        SEQUENCE NUMBER>
>
> In such  a way, I have data of around 19,200 unique pdb files which have one 
> or
> more ligands attached to them. [PLEASE NOTE THAT there can be multiple ligands
> to a particular .pdb file attached at different positions ]
>
> For each .pdb file, I need to extract complete residues which fall within a
> radius of 4.5 Angstroms of the ligand. I am calling such zones as ZONE1.I mean
> residues that have any atom within 4.5 Angstroms of the ligand => zone1
> Then after extracting ZONE1, I also want to extract complete residues which 
> fall
> within a radius of 4.5 Angstroms of ZONE1.. I am calling these zones as 
> ZONE2. I
> mean, residues that have any atom within 9.0 Angstroms of the ligand, but are
> not already in ZONE1 => ZONE2
>
> I am looking for a way to automate Pymol by writing a .pml script, such that
> foreach pdb file, I have 2 additional files generated such that they are 
> called
> as: 19gs_BSP_z1.pdb [for ZONE1] and 19gs_BSP_z2.pdb [for ZONE2],
> 1a2d_PYX_z1.pdb, 1a2d_PYX_z2.pdb and so on...
>
> Can this be done through PERL?
> Please suggest me an efficient way of achieving the desired output..
>
> Thanks,
>
> -Anasuya
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Fwd: Rendering 3D Surveys with Pymol

2011-10-06 Thread Tsjerk Wassenaar
I just can't help myself...

> (for instance, a rainbow colour scheme based on survey trip?)

Can he do a colour scheme based on LSD trip too?

But it's cool :)

Cheers,

Tsjerk


-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Setting-Error: type read mismatch (float) -1

2011-10-09 Thread Tsjerk Wassenaar
Hi Lina,

Can you tell more? What version are you using, what system are you on, do
you use a .pymolrc, and what exactly do you do?

Cheers,

Tsjerk

On Oct 9, 2011 5:05 PM, "lina"  wrote:



On Sun, Oct 9, 2011 at 10:50 PM, lina  wrote: > >
Hi, > > I met the followi...
Still something abnormal.

When I tried to write session, it's terminated and showed:
  Save: Please wait -- writing session file...
Segmentation fault


> Thanks,
>
>
>

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Setting-Error: type read mismatch (float) -1

2011-10-09 Thread Tsjerk Wassenaar
Hey Lina,

It most likely is a consequence of the update. But the error comes
from the settings code, so I assumed that you set some settings at
startup, which brings a .pymolrc in mind. Not loading that file would
then solve it, although the problem is probably more fundamental, and
I would suspect you'd get an error like that when just setting some
setting in Pymol. If you can give more information regarding the
modules that were updated, it would be very helpful. Otherwise, I'm
rather clueless...

Cheers,

Tsjerk

On Sun, Oct 9, 2011 at 7:42 PM, lina  wrote:
> On Oct 10, 2011, at 1:04, Tsjerk Wassenaar  wrote:
>
> Hi Lina,
>
> Can you tell more? What version are you using, what system are you on, do
> you use a .pymolrc, and what exactly do you do?
>
> Version 1.4.
> Debian amd64
> I did use .pymolrc.
> Please kindly notice the problem just recent two days showed up.
> The .pymolrc has been used for a while.
> Today I reinstalled the pymol. Still the same.
> Do you think it's related to the .pymolrc?
> Right now I'm not in front of computer.
> Later (now is 1:40 am here, probably 8 or 9 hours later) I can remove the
> .pymolrc and test.
> Actually I suspected It might due to the update of some package in my box.
> But I have no clue about how to check further.
> Thanks.
>
> Cheers,
>
> Tsjerk
>
> On Oct 9, 2011 5:05 PM, "lina"  wrote:
>
>
>
> On Sun, Oct 9, 2011 at 10:50 PM, lina  wrote: > >
> Hi, > > I met the followi...
>
> Still something abnormal.
>
> When I tried to write session, it's terminated and showed:
>   Save: Please wait -- writing session file...
> Segmentation fault
>
>>
>> Thanks,
>>
>>
>
>
> --
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] how can quickly make a fractional atoms into one

2011-10-11 Thread Tsjerk Wassenaar
Hi Lina,

Not really a Pymol question, is it?
On linux you can use sed:

sed '/^\(ATOM\|HETA\)/s/^\(.\{72\}\)/\1/' filein.pdb > fileout.pdb

That means:

/^\(ATOM\|HETA\)/ :: Match lines starting with ATOM or with HETA, and
on those lines execute:
s/^\(.\{72\}\)/\1/ :: Subsitute the first 72 characters and
the following four by the first 72 and four spaces. '\1' refers to the
72 stored characters: \(.\{72\}\}

Hope it helps,

Tsjerk


On Tue, Oct 11, 2011 at 9:59 AM, lina  wrote:
> Hi,
>
> I wish to change
>
> ATOM    822  H01 PDB 1  32.103  36.531  -0.203 -0.11  0.02  .296
> H
> ATOM    823  C12 PDB 1  34.140  35.147  -0.218 -0.18 -0.01  .122
> C
>
> to:
>
> ATOM    822  H01 PDB 1  32.103  36.531  -0.203 -0.11
> 0.02 H
> ATOM    823  C12 PDB 1  34.140  35.147  -0.218 -0.18
> -0.01 C
>
> only the last field.
>
> How can I quickly achieve it.
>
> Thanks,
>
>
>
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] how can quickly make a fractional atoms into one

2011-10-11 Thread Tsjerk Wassenaar
Hi Lina,

That's best done following Thomas' approach, but using chain="X" in
stead of segi=''

set pdb_retain_ids
load input.pdb
alter selection, chain='X'
save output.pdb

Cheers,

Tsjerk

On Tue, Oct 11, 2011 at 10:33 AM, lina  wrote:
>
>
> On Tue, Oct 11, 2011 at 4:24 PM, Thomas Holder
>  wrote:
>>
>> On 10/11/2011 10:16 AM, Tsjerk Wassenaar wrote:
>>>
>>> Not really a Pymol question, is it?
>>
>> well, it's the segment identifier column, so you can do with PyMOL:
>>
>> set pdb_retain_ids
>> load input.pdb
>> alter all, segi=''
>> save output.pdb
>
> Thanks,
>
> a bit further question, how to add chain identifier in pymol?
>
> Here the situation is the 6 small ligands shared the same resn and even same
> resi,
>
>
>>
>> Cheers,
>>  Thomas
>>
>>> On linux you can use sed:
>>>
>>> sed '/^\(ATOM\|HETA\)/s/^\(.\{72\}\)/\1    /' filein.pdb>
>>>  fileout.pdb
>>>
>>> That means:
>>>
>>> /^\(ATOM\|HETA\)/ :: Match lines starting with ATOM or with HETA, and
>>> on those lines execute:
>>> s/^\(.\{72\}\)/\1    / :: Subsitute the first 72 characters and
>>> the following four by the first 72 and four spaces. '\1' refers to the
>>> 72 stored characters: \(.\{72\}\}
>>>
>>> Hope it helps,
>>>
>>> Tsjerk
>>>
>>>
>>> On Tue, Oct 11, 2011 at 9:59 AM, lina  wrote:
>>>>
>>>> Hi,
>>>>
>>>> I wish to change
>>>>
>>>> ATOM    822  H01 PDB     1      32.103  36.531  -0.203 -0.11  0.02
>>>>  .296
>>>> H
>>>> ATOM    823  C12 PDB     1      34.140  35.147  -0.218 -0.18 -0.01
>>>>  .122
>>>> C
>>>>
>>>> to:
>>>>
>>>> ATOM    822  H01 PDB     1      32.103  36.531  -0.203 -0.11
>>>> 0.02             H
>>>> ATOM    823  C12 PDB     1      34.140  35.147  -0.218 -0.18
>>>> -0.01             C
>>>>
>>>> only the last field.
>>>>
>>>> How can I quickly achieve it.
>>>>
>>>> Thanks,
>>
>> --
>> Thomas Holder
>> MPI for Developmental Biology
>
>
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] PQR Display in PyMOL

2011-10-12 Thread Tsjerk Wassenaar
Hi Martin,

You can use b and q as selection keywords (help selections):

color red, b < 0
color blue, b > 0

Or you can use 'spectrum' (help spectrum):

spectrum b, red_white_blue

Hope it helps,

Tsjerk

On Oct 13, 2011 12:58 AM, "Martin Hediger"  wrote:

Dear List
I have the below model of three charged atoms (as a PQR file).
ATOM  1C ASP A   0.0 0.010.0   -2.0  4.0
ATOM  2C ASP A   0.0 0.0 0.0   -2.0  4.0
ATOM  3C ASP A   0.0 0.0   -10.02.0  4.0

The last two numbers are the charge and the radius, it's supposed to be
in pqr format.
Can PyMOL display the negative atoms blue and the positive one red (or
the other way around)?

Thanks for any help.
Martin

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] PQR Display in PyMOL

2011-10-13 Thread Tsjerk Wassenaar
Hi Martin,

I think that Pymol indeed assumes PDB formatting, where the b-factor
and occupancy fields are float format %6.2f, whereas the PQR format
often uses %8.3f formatting in stead. That will make both approaches
fail. You'll have to do some scripting to get it right:

You can try the following function. Not tested though :p

def load_pqr(pqr,name=""):
if not name:
name = name.replace(".pqr","")
pdb = []
for i in open(pqr):
if i.startswith("ATOM") or i.startswith("HETATM"):
pdb.append(i[:54]+"%6.2f%6.2f\n"%(float(i[54:60]),float(i[60:66])))
else:
pdb.append(i)
cmd.read_pdbstr("".join(pdb),name=name)

cmd.extend("load_pqr",load_pqr)

Cheers,

Tsjerk

On Thu, Oct 13, 2011 at 9:12 AM, Martin Hediger  wrote:
> Thanks, Tsjerk
> However, the first set of commands does not seem to have any effect (neither
> produce an error). Is it supposed to be able to enter them at the PyMOL
> prompt just as you wrote? The spectrum command seems to have an effect but
> all atoms appear in red. One  should be blue.
> Is there a restriction on how the PQR file is to be formatted? I was reading
> PQR is not as strict as PDB format, so I believe the file I posted should be
> a valid PQR format.
>
> Martin
>
>
>
>
>
>
>
> Am 13.10.11 06:17, schrieb Tsjerk Wassenaar:
>
> Hi Martin,
>
> You can use b and q as selection keywords (help selections):
>
> color red, b < 0
> color blue, b > 0
>
> Or you can use 'spectrum' (help spectrum):
>
> spectrum b, red_white_blue
>
> Hope it helps,
>
> Tsjerk
>
> On Oct 13, 2011 12:58 AM, "Martin Hediger"  wrote:
>
> Dear List
> I have the below model of three charged atoms (as a PQR file).
> ATOM      1    C ASP A           0.0     0.0    10.0       -2.0  4.0
> ATOM      2    C ASP A           0.0     0.0     0.0       -2.0  4.0
> ATOM      3    C ASP A           0.0     0.0   -10.0        2.0  4.0
>
> The last two numbers are the charge and the radius, it's supposed to be
> in pqr format.
> Can PyMOL display the negative atoms blue and the positive one red (or
> the other way around)?
>
> Thanks for any help.
> Martin
>
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Chempy model

2011-10-14 Thread Tsjerk Wassenaar
Hi Андрей,

That is not possible.

You set a new property on a chempy model instance. load_model converts
that model into an internal representation, simply neglecting the new
property. get_model creates a fresh chempy model instance, which has
no .name property.

If you really, really want to do it, you'll have to change the chempy
model class definition in the code, but also change the internal
structure and the functions load_model and get_model.

The best solution is just do the bookkeeping yourself in the script.


Cheers,

Tsjerk


On Fri, Oct 14, 2011 at 12:06 PM, Андрей Гончар  wrote:
> Hello.
> As an example:
> I create a chempy model
> m = chempy.model.Indexed()
> I add some atoms and bonds to this model
> I add an attribute 'name' to this model
> m.name = 'model_name'
> After that I load this model into PyMOL
> cmd.load_model(m, 'loaded_model')
> [I do something] an I want my model back. So I execute
> m1 = cmd.get_model('loaded_model')
> But now object m1 does not have the attribute 'name'
> and m1.name gives an error.
>
> Is it possible to add and preserve extra arguments to model objects?
>
> --
>
> Андрей Гончар
>
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Atom selection

2011-10-14 Thread Tsjerk Wassenaar
Hi George,

You might want to use cmd.get_model() to make your life  easier. It turns a
selection into a chempy model, which has an attribute .atom, containing all
the corresponding atoms with names, identifiers, coordinates, etc.
Check scripts on the pymolwiki that do comparable things.

Hope it helps,

Tsjerk

On Oct 15, 2011 12:03 AM, "George Kvaratskhelia" 
wrote:

I'm writing a function script in Python for PyMOL and I need to convert an
atoms number to its location, or somehow gain a list of atom locations form
a group location.
When the script is ran and the function is used the atom locations are
entered :
GKDistance("GLY`730/*","LYS`115/N*")

If I could somehow turn those two group locations into two lists or atom
names in those groups then I could finish writing this program. But I am
having no luck of converting the group location or the atom number to the
atom locations in that group.

I do also understand the cmd.distance command is being used with atom
numbers instead of locations, I just left it that way but I do understand
that the command does no work this way. Everything else in my program
outputs the way I want it to too.

Here is a copy of my script:

def GKDistance(group1, group2 ):
from pymol import stored
f=open('DistanceResults.txt','w')
 group_distance=cmd.distance(group1,group2)
f.write("Distance of group 1 to group 2 is:")
 f.write("\n")
group_average="%f" %group_distance
f.write(group_average)
 f.write("\n")
list1=cmd.index(group1)
list2=cmd.index(group2)
 for i in range(0,len(list1)):
location=list1[i]
header="Group1 atom %s distance to:" %(location[1])
 f.write(header)
f.write("\n")
for j in range(0,len(list2)):
 statement=list2[j]
distance=cmd.distance('%d','%d') %(location[1],statement[1])
 fullstatement="atom %s is %d \n" %(statement[1], 50)
f.write(fullstatement)

from pymol import cmd, stored

cmd.extend( "GKDistance", GKDistance );

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] missing residues

2011-10-14 Thread Tsjerk Wassenaar
Selam Ahmet,

I cordially suggest to have a look at
http://catb.org/~esr/faqs/smart-questions.html to phrase your question
more effectively, such that we can provide more tailored help. It
would have been nice to have an example that we could try ourselves.

I find that as preparation for MD simulations you can often get away
with more casual modeling, using pymol for copy-paste. That is,
provided you have a structure with the missing parts resolved, which
is the case. Here is a working example, where the chains are from
different models, but the principle is the same.

# Get a structure with a missing loop
fetch 1d0g, async=0

# Get the structure which has that loop resolved
fetch 1d4v, async=0

# Extract  the chain you want to fit; not really (necessary)
create chainb, 1d4v and chainb

# Fit the chain onto the one with the missing loop
align chainb, 1d0g and chain a

# Alter the chain identifier to match the target:
alter chainb, chain="A"

# Write the residues that are missing
save missing.pdb, chainb and resi 132-144

# Now you can take the coordinates from 'missing.pdb' and insert them
in the target pdb file in the right place

# Remove the rubbish
delete 1d4v
delete chainb

# Load the loop
load missing.pdb

# Et voila...


Hope it helps,

;)

Tsjerk

2011/10/14 ahmet yıldırım :
> Thanks Michael,
>
> How can I overcome using Pymol?
>
> 14 Ekim 2011 23:05 tarihinde Michael Zimmermann 
> yazdı:
>>
>> The easiest way to model in the missing loops is to make a homology model
>> of the full sequence using the incomplete structure as a template.
>> (http://swissmodel.expasy.org or I-TASSER)
>>
>> Alternatively, you can use Modeller to model in the loop and refine it.
>>
>>
>>
>> 2011/10/14 ahmet yıldırım 
>>>
>>> Dear users,
>>>
>>> There are 7 missing residues in xxx.pdb file. xxx.pdb consist of chain a
>>> and chain b. In chain b there are only 7 missing residues. chain a is
>>> complete.
>>> I fitted the complete chain onto the one with missing residues, wrote the
>>> new coordinates for the fitted chain and put them in the broken chain using
>>> a text editor.
>>> I think the chain a and chain b do not fit/overlap
>>> As result, in chain b alpha is incomplete (see result image). what should
>>> I do?
>>>
>>> 1.way:
>>> pymol-file-open-protein.pdb
>>> PyMOL>create chaina, chain a
>>> PyMOL>align chaina and resi 2-230, chain b and resi 2-230
>>> PyMOL>save chaina.pdb, chaina
>>>
>>> 2.way:
>>> pymol-file-open-protein.pdb
>>> PyMOL>create chaina, chain a
>>> PyMOL>create chainb, chain b
>>> PyMOL>align chaina and resi 2-230, chainb and resi 2-230
>>> PyMOL>save chaina.pdb, chaina
>>>
>>>
>>> Again the result didnt change :(
>>> --
>>> Ahmet YILDIRIM
>>>
>>>
>>> --
>>> All the data continuously generated in your IT infrastructure contains a
>>> definitive record of customers, application performance, security
>>> threats, fraudulent activity and more. Splunk takes this data and makes
>>> sense of it. Business sense. IT sense. Common sense.
>>> http://p.sf.net/sfu/splunk-d2d-oct
>>> ___
>>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>
>>
>>
>> --
>> Michael Zimmermann
>> Ph.D. student in Bioinformatics and Computational Biology
>> Department of Biochemistry, Biophysics and Molecular Biology
>> Iowa State University
>
>
>
> --
> Ahmet YILDIRIM
>
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.n

Re: [PyMOL] Ray Trace Mode 1 and Labels

2011-10-14 Thread Tsjerk Wassenaar
Hi Jack,

Unfortunately, that is not possible. The ray-trace mode affects the
behaviour/display of edges during raytracing, It's basically doing
edge detection, similar to what can be done in image processing
afterwards. So, it's similar to having an image and wanting to enhance
edges on some, but not on other objects, using photoshop or so. It's
impossible to do that automatically.

In principle, it would be possible to modify the behaviour of the
raytracer, though. But I think it would require quite a bit of effort
coding that. But it could be interesting, also to use different line
colors for different selections :)

Sorry,

Tsjerk

On Fri, Oct 14, 2011 at 3:38 PM, Jack Orford  wrote:
> Is there a way to stop ray_trace_mode 1 putting an outline on labels?  
> Although the outline looks quite good for the graphics, especially once they 
> are printed, it makes the text look like blocky typewriter font.  Any advice 
> appreciated.
>
> Thanks
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Putting a protein molecule into a grid and traversing through the grid

2011-10-27 Thread Tsjerk Wassenaar
Hey :)

Does the script pasted below do what you want? It does not move the
molecule(s), but it returns a list of occupied bins with the ids,
names and chains of residues in it.

Hope it helps,

Tsjerk

###

from pymol import cmd

def _bin(x,d):
d = float(d)
a,b,n = min(x),(1-1e-16)/(max(x)-min(x)),int((max(x)-min(x))/d+0.5)
return [ int(b*(i-a)*n)*d for i in x ]

def bin(sele="all",d=5):
m = cmd.get_model(sele)
b = zip(*[ _bin(i,5) for i in zip(*m.get_coord_list()) ])
print b
d = dict()
for i,j in zip(b,m.atom):
d[i] = d.get(i,[]) + [(j.resi, j.resn, j.chain)]
return d.items()




On Thu, Oct 27, 2011 at 4:25 PM, Thomas Holder
 wrote:
> Hi Anasuya,
>
>> how do i put a protein molecule inside a cube with x-axis spanning till the
>> largest x-coordinate, y-axis spanning till the largest y-coordinate, and 
>> z-axis
>> spanning till the largest z-coordinate?
>>
>> Once i do this, can i divide the larger cube(i.e. the one holding the entire
>> protein) into smaller ones of lesser dimensions? Say, 5A x 5A x 5A?
>
> I'm not aware of any straightforward solution for this. You could write
> a python script that creates selections for each (sub)cube, but I guess
> it will be a quite complex script. Have a look at
> http://pymolwiki.org/index.php/SelInside which should cover all
> necessary API functions.
>
>> Once i generate these smaller cubes, is there a way via pymol, by which i can
>> navigate through the protein molecule, (smaller)cube by (smaller)cube?
>> As in, can pymol be used to tell me which residues are lying in which 
>> (smaller)
>> cube and so on?
>
> If you have selections for each cube, try this to lookup cubes that
> contain atoms of residue number 10:
>
> print cmd.get_names('public_selections', 0, 'resi 10')
>
>> Can all this be done in a single pymol window/script?
>> please let me know.
>>
>> Thanks
>> -Anasuya
>
> Cheers,
>   Thomas
>
> --
> Thomas Holder
> MPI for Developmental Biology
>
> --
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Putting a protein molecule into a grid and traversing through the grid

2011-10-27 Thread Tsjerk Wassenaar
Right, forgot to mention that the bin is given as the coordinates of
the lower corner, relative to the minimal coordinates.

Cheers,

Tsjerk

On Thu, Oct 27, 2011 at 6:02 PM, Tsjerk Wassenaar  wrote:
> Hey :)
>
> Does the script pasted below do what you want? It does not move the
> molecule(s), but it returns a list of occupied bins with the ids,
> names and chains of residues in it.
>
> Hope it helps,
>
> Tsjerk
>
> ###
>
> from pymol import cmd
>
> def _bin(x,d):
>    d = float(d)
>    a,b,n = min(x),(1-1e-16)/(max(x)-min(x)),int((max(x)-min(x))/d+0.5)
>    return [ int(b*(i-a)*n)*d for i in x ]
>
> def bin(sele="all",d=5):
>    m = cmd.get_model(sele)
>    b = zip(*[ _bin(i,5) for i in zip(*m.get_coord_list()) ])
>    print b
>    d = dict()
>    for i,j in zip(b,m.atom):
>        d[i] = d.get(i,[]) + [(j.resi, j.resn, j.chain)]
>    return d.items()
>
>
>
>
> On Thu, Oct 27, 2011 at 4:25 PM, Thomas Holder
>  wrote:
>> Hi Anasuya,
>>
>>> how do i put a protein molecule inside a cube with x-axis spanning till the
>>> largest x-coordinate, y-axis spanning till the largest y-coordinate, and 
>>> z-axis
>>> spanning till the largest z-coordinate?
>>>
>>> Once i do this, can i divide the larger cube(i.e. the one holding the entire
>>> protein) into smaller ones of lesser dimensions? Say, 5A x 5A x 5A?
>>
>> I'm not aware of any straightforward solution for this. You could write
>> a python script that creates selections for each (sub)cube, but I guess
>> it will be a quite complex script. Have a look at
>> http://pymolwiki.org/index.php/SelInside which should cover all
>> necessary API functions.
>>
>>> Once i generate these smaller cubes, is there a way via pymol, by which i 
>>> can
>>> navigate through the protein molecule, (smaller)cube by (smaller)cube?
>>> As in, can pymol be used to tell me which residues are lying in which 
>>> (smaller)
>>> cube and so on?
>>
>> If you have selections for each cube, try this to lookup cubes that
>> contain atoms of residue number 10:
>>
>> print cmd.get_names('public_selections', 0, 'resi 10')
>>
>>> Can all this be done in a single pymol window/script?
>>> please let me know.
>>>
>>> Thanks
>>> -Anasuya
>>
>> Cheers,
>>   Thomas
>>
>> --
>> Thomas Holder
>> MPI for Developmental Biology
>>
>> --
>> The demand for IT networking professionals continues to grow, and the
>> demand for specialized networking skills is growing even more rapidly.
>> Take a complimentary Learning@Cisco Self-Assessment and learn
>> about Cisco certifications, training, and career opportunities.
>> http://p.sf.net/sfu/cisco-dev2dev
>> ___
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>
>
>
>
> --
> Tsjerk A. Wassenaar, Ph.D.
>
> post-doctoral researcher
> Molecular Dynamics Group
> * Groningen Institute for Biomolecular Research and Biotechnology
> * Zernike Institute for Advanced Materials
> University of Groningen
> The Netherlands
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Create a dummy atom

2011-11-15 Thread Tsjerk Wassenaar
Hi Troels,

> I think to get the return values of a script, you need to put them
> inside python boxes

I'd assume it'd be a Python script :) But also for a PyMOL script,
it's not exactly true. However, then there should be no space before
the equality sign. This should work:

theCenter=COM(...)
pseudoatom("theAtom",pos=theCenter)

Groetjes,

Tsjerk

-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] disable automatic zoom upon create

2011-11-16 Thread Tsjerk Wassenaar
Hi Daniel,

set auto_zoom,0

Cheers,

Tsjerk

On Wed, Nov 16, 2011 at 11:02 AM, Daniel Larsson  wrote:
> Hi,
>
> Is it possible to disable the automatic zoom of the view to fit the newly 
> created object when one issues the create command?
>
> Daniel
> --
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Question Iterate

2011-11-28 Thread Tsjerk Wassenaar
Hi Martin,

The temporary namespace for an atom means that variables like 'resn'
can be used to refer to the attribute with that name on the atom
instance.

You are right that iterate is here used to iterate over a single atom.
That does seem a bit odd :p But it seems to be a more straightforward
way to get to the properties desired.

This is what I would do:

residues=set()
iterate all, residues.add((chain,resn,resi))
for res in residues: cmd.save("%s-%s-%s.pdb"%res,"chain %s and resn %s
and resi %s"%res)

Of course that could be easily forged into a nice function :)

Hope it helps,

Tsjerk
On Mon, Nov 28, 2011 at 3:57 PM, Martin Hediger  wrote:
> In this example below (from Thomas), the method 'iterate' is used. The
> function saves every amino acid of a structure to a separate file. First
> of all, I'm not sure of how to understand the docs:
>
> " "iterate" iterates over an expression within a temporary namespace for
> each atom."
>
> What does temporary namespace for each atom mean? Also, since 'iterate'
> is used within the while-loop, are we only iterating over the single
> amino acid? Its confusing me because I constantly think of iterate as
> somekind of short hand notation of a for-loop, but I guess thats not it.
> It would be great if somebody could explain the iterate function a bit
> more to me.
>
> Thanks for your feedback.
> Martin
>
> # *
> # import statements
> def seq(state, selection="name ca or resn hoh or resn lig"):
>      cmd.select("prot", selection)
>      while cmd.pop("_tmp", "prot"):
>          cmd.iterate("_tmp", "stored.x=(resn,resv)")
>          # Special case 1: Waters.
>          if stored.x[0] == 'HOH':
>              filename = 'seq-x%s-%s.pdb' % (stored.x[1], state)
>          # Special case 2: Substrate.
>          elif stored.x[0] == 'LIG':
>              filename = 'seq-x%s-%s.pdb' % (stored.x[1], state)
>          # Other: protein back-bone.
>          else:
>              filename = 'seq-%s%d-%s.pdb' % (one_letter[stored.x[0]].lower(), 
> stored.x[1], state)
>          cmd.save(filename, "byres _tmp")
>      cmd.delete('_tmp prot')
>
> cmd.extend('seq', seq)
> # -
>
>
>
> --
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] RMSD between two structures

2011-11-29 Thread Tsjerk Wassenaar
Hi Martin,

It should be RMSD indeed. Mind that the final RMSD from align is obtained
after optimizing the fit by leaving out outliers.

Cheers,

Tsjerk

On Nov 29, 2011 10:07 AM, "Martin Hediger"  wrote:

Is the RMS the same as RMSD? PyMOL writes "RMS" when using align.
Martin





Am 11.11.11 14:59, schrieb Thomas Holder:

> Hi Martin, > > is it the transform=0 argument what you are looking for? >
> http://pymolwiki.org/i...
--
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d

___ PyMOL-users mailing list
(PyMOL-users@lists.sourcefo...
--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Get number of residues in model

2011-11-29 Thread Tsjerk Wassenaar
Hi Martin,

Here's a fourth option (and the technique worth noting :p ):

print len( set( [(i.chain,i.resi,i.resn) for i in
cmd.get_model(selection).atom] ) )

Cheers,

Tsjerk

On Tue, Nov 29, 2011 at 4:26 PM, Jason Vertrees
 wrote:
> Hi Martin,
>
> You get three options:
>
> (1) You can count alpha carbons:
>
> fetch 1rx1, async=0
>
> count_atoms n. CA
>
>
> (2) But, a protein could be missing alpha carbons then this is more
> complete (and the technique worth noting):
>
> n=0
> select qq, polymer
> select pp, None
> python
> while cmd.count_atoms("qq"):
>  cmd.select("pp", "br. first qq")
>  cmd.select("qq", "qq and not pp")
>  n+=1
> python end
> print "count_atoms: %d" % n
>
> If you put:
>
> select qq, *
>
> you'll get a higher count (160) because one atom in 1rx1's inorganic
> set is also named "CA".
>
>
> (3) The shorter version of (2) is:
>
> print len(cmd.get_model("poly").get_residues())
>
> Cheers,
>
> -- Jason
>
>
> On Tue, Nov 29, 2011 at 9:50 AM, Martin Hediger  wrote:
>> Dear List
>> How can I compute the numbers of residues in a model?
>>
>> Martin
>>
>> --
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> ___
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>
>
>
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrodinger, LLC
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>
> --
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] RMSD between two structures

2011-11-30 Thread Tsjerk Wassenaar
Hi Martin,

It does an alignment, finding matching pairs of atoms, removing
outliers and calculating the RMSD over the remaining matches.

Cheers,

Tsjerk

On Wed, Nov 30, 2011 at 11:05 AM, Martin Hediger  wrote:
> How does PyMOL calculate the RMSD between two structures where the
> number of atoms is different?
> Martin
>
>
>
>
>
>
> Am 11.11.11 14:59, schrieb Thomas Holder:
>> Hi Martin,
>>
>> is it the transform=0 argument what you are looking for?
>>
>> http://pymolwiki.org/index.php/Align#PYMOL_API
>>
>> x = cmd.align('foo', 'bar', transform=0)
>> print 'RMSD:', x[0]
>>
>> About the "some kind of refinement": There are arguments "cutoff" and
>> "cycles" that control this behaviour.
>>
>> Cheers,
>>   Thomas
>>
>> On 11/11/2011 02:46 PM, Martin Hediger wrote:
>>> Dear List.
>>> When aligning two structures using the PyMOL align command, one gets a
>>> final RMS value indicating some kind of "convergence" i would say. Can I
>>> somehow access the function for calculating this value directly from the
>>> pymol prompt without aligning?
>>>
>>> Thanks for hints
>>> Martin
>>
>
>
> --
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Reading Protein Structure File (PSF)

2011-12-07 Thread Tsjerk Wassenaar
Hi Sean,

The .psf file format is for a topological desription (bonds, angles, etc),
not for coordinates afaik.

Cheers,

Tsjerk

On Dec 7, 2011 6:25 PM, "Sean Law"  wrote:

 Hi PyMOLers,

Can anybody tell me if there's a way to read in a protein structure file
(PSF).  This is a common file format in simulation programs such as CHARMM
and NAMD and basically gives similar information to the PDB file.

Any suggestions would be greatly appreciated.

Thank you for your time.

Sean

--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] jump to some states

2011-12-15 Thread Tsjerk Wassenaar
Hi Lina,

In addition, you can split out a specific state using:

create StateX, selection, state=X

Check out 'help create'

Cheers,

Tsjerk

On Thu, Dec 15, 2011 at 6:26 AM, Jason Vertrees
 wrote:
> Lina,
>
> To jump to any given state, X, just type,
>
> set state, X
>
> If you want a specific object to frozen in state X, do
>
> set state, X, objName
>
> When the command line is free of text, the right and left arrow keys
> cycle through states.
>
> Split_states takes a multi-state protein and makes each state its own
> object; this is the same as setting "multiplex=1" on the "fetch"
> command.
>
> You can save all states with:
>
> save foo.pdb, foo, state=0
>
> or just one given state with,
>
> save foo_state4.pdb, foo, state=4
>
> Cheers,
>
> -- Jason
>
> On Thu, Dec 15, 2011 at 12:17 AM, lina  wrote:
>> Hi,
>>
>> suppose I have 201 states,
>>
>> how can I quick jump to 101 states.
>>
>> or how can I split the 100 and 101 states out, when I used split_states, 
>> protein
>>
>> it all split out.
>>
>> Thanks for any suggestions,
>>
>> Best regards,
>>
>> --
>> 10 Tips for Better Server Consolidation
>> Server virtualization is being driven by many needs.
>> But none more important than the need to reduce IT complexity
>> while improving strategic productivity.  Learn More!
>> http://www.accelacomm.com/jaw/sdnl/114/51507609/
>> ___
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>
>
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrodinger, LLC
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>
> --
> 10 Tips for Better Server Consolidation
> Server virtualization is being driven by many needs.
> But none more important than the need to reduce IT complexity
> while improving strategic productivity.  Learn More!
> http://www.accelacomm.com/jaw/sdnl/114/51507609/
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Color states as rainbow

2011-12-18 Thread Tsjerk Wassenaar
Hey :)

You could copy the state to the b-factor field:

fetch 1nmr, async=1
split_states 1nmr
for i in range(1,cmd.count_states()+1): cmd.alter("1nmr_%04d"%i,"b=%d"%i)
delete 1nmr
spectrum b

Cheers,

Tsjerk

On Mon, Dec 19, 2011 at 7:38 AM, Jason Vertrees
 wrote:
> Hi Jacob,
>
> You cannot use the spectrum command across multiple states like that.
> Your next best bet is to try:
>
> set color, color_name, obj_name, state=X
>
> For example,
>
> set line_color, red, myProtein,  state=1
> set line_color, orange, myProtein, state=2
> set line_color, yellow, myProtein, state=3
> ...
>
> Cheers,
>
> -- Jason
>
> On Sun, Dec 18, 2011 at 9:38 PM, Jacob Keller
>  wrote:
>> type
>
>
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrodinger, LLC
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>
> --
> Learn Windows Azure Live!  Tuesday, Dec 13, 2011
> Microsoft is holding a special Learn Windows Azure training event for
> developers. It will provide a great way to learn Windows Azure and what it
> provides. You can attend the event by watching it streamed LIVE online.
> Learn more at http://p.sf.net/sfu/ms-windowsazure
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] what's wrong in this code.. please help!

2012-03-02 Thread Tsjerk Wassenaar
Hey Anasuya,

On Fri, Mar 2, 2012 at 5:13 PM, Anasuya Dighe  wrote:
> What's going wrong with this code?
> ___CODE___
> from pymol import cmd
>
> def process_line(x):
>  pdbid,res,chain,num = x.split()
>  cmd.load(pdbid)
>  cmd.select("target","(resn %s and chain %s and resi %s)"%(res,chain,num))
>  cmd.select("zone2","(br. (target expand 9 and not (target expand 4.5)) and 
> not
> resn HOH and not HET)"

You're missing a closing parenthesis here.

Cheers,

Tsjerk

-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] How to install g_mdmat from Gromacs package into PyMOL

2012-03-07 Thread Tsjerk Wassenaar
Hi Suheila,

That is really not straightforward under Windows. To run any Gromacs
tools under Windows, the preferred way to install is using Cygwin. But
that will pose a problem coupling to Pymol. I'd say you're out of
luck, sorry.

Cheers,

Tsjerk


On Wed, Mar 7, 2012 at 4:15 PM, Suhaila Haji Mohd Hussin
 wrote:
> Hey everyone!
>
> If you go to this link below:
>
> http://www.pymolwiki.org/index.php/Contact_map_visualizer
>
> Under 'Generate Contact Map', it says that I need g_mdmat first from Gromacs
> package.
>
> I already downloaded gromacs-4.5.5.tar.gz assuming g_mdmat should be in
> there and just unzipped it.
>
> The problem is I don't know how to install gromacs-4.5.5 onto PyMOL
> directory? Please help.
>
> P/S: My PyMOL is running on Windows 7 and My python is 2.7.
>
> Cheers,
> Suhaila.
>
> --
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] FW: Installed Gromacs but generate contact map using g_mdmat (Gromacs) still failed

2012-03-12 Thread Tsjerk Wassenaar
Hi Suheila,

Are you running both pymol and gromacs on the virtual machine?
Are tge gromacs binaries installed in /usr/bin or /usr/local/bin or
otherwise globally available?

Cheers,

Tsjerk

On Mar 11, 2012 10:00 PM, "Suhaila Haji Mohd Hussin" <
bell_beaut...@hotmail.com> wrote:

 The problem I'm referring to is here:

http://www.pymolwiki.org/index.php/Contact_map_visualizer

--
From: bell_beaut...@hotmail.com
To: pymol-users@lists.sourceforge.net
Subject: Installed Gromacs but generate contact map using g_mdmat (Gromacs)
still failed
Date: Mon, 12 Mar 2012 08:57:11 +1200

Hello. We've just successfully installed Gromacs on Ubuntu Linux (Virtual
Machine) but the probl...

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Query on Contact Map Visualizer

2012-03-12 Thread Tsjerk Wassenaar
Hi Suhaila,

>From what I understand from the wiki, you have to have a match between
the PDB and the contact map. If your contact map was made on a
structure with multiple chains, all chains will be in there. If you
want to select a single chain, you have to extract that chain from
thhe PDB file, then run g_mdmat, and then load the PDB file and the
map into Pymol.

Hope it helps,

Tsjerk

On Mon, Mar 12, 2012 at 1:43 PM, Suhaila Haji Mohd Hussin
 wrote:
> Hello guys,
>
> Regarding the subject mentioned above, I'm wondering if PDB file has more
> than one chain, will the generation of contact map using g_mdmat from
> Gromacs
> still produce a map of all chains?
>
> Don't I have a choice to choose one chain?
>
> Refer the subject above for more details:
> http://www.pymolwiki.org/index.php/Contact_map_visualizer
>
> Cheers,
> Suhaila.
>
> --
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Error running Contact Map Visualizer Plugin

2012-03-13 Thread Tsjerk Wassenaar
Hi Suhaila,

It looks like it's trying to load the XPM file, in stead of the
jpg/png. How did you invoke Pymol and what commands did you give?

Cheers,

Tsjerk

On Tue, Mar 13, 2012 at 1:49 PM, Suhaila Haji Mohd Hussin
 wrote:
> Hello everyone especially to people who have used Contact Map Visualizer
> plugin before.
>
> Please refer the link below for more details of the issue:
> http://www.pymolwiki.org/index.php/Contact_map_visualizer
>
> In that link I managed  to generate the contact map successfully and
> converted the format from xpm to either jpg or png.
>
> When I loaded the contact map it was alright but after then as I loaded a
> pdb file that generates the contact map it gives me the following error
> instead of displaying the contact map which is shown in the link.
>
> Please help me what's this error all about?
>
> Error: 1
>  Exception in Tk callback
> Function:  at 0xa180cdc> (type: )
> Args: ()
> Traceback (innermost last):
> File "/usr/lib/python2.7/dist-packages/Pmw/Pmw_1_3/lib/PmwBase.py", line
> 1747, in __call__
> return apply(self.func, args)
> File
> "/usr/lib/pymodules/python2.7/pmg_tk/startup/contact_map_visualizer.py",
> line 54, in 
> self.menuBar.addmenuitem('Plugin', 'command','Contact Map Visualizer',label
> = 'Contact Map Visualizer',command = lambda s=self : getImageLocation(s))
> File
> "/usr/lib/pymodules/python2.7/pmg_tk/startup/contact_map_visualizer.py",
> line 68, in getImageLocation
> getPDBLocation(self)
> File
> "/usr/lib/pymodules/python2.7/pmg_tk/startup/contact_map_visualizer.py",
> line 83, in getPDBLocation
> loadImageOnScreen(self.file.name, self.pdbFile.name)
> File
> "/usr/lib/pymodules/python2.7/pmg_tk/startup/contact_map_visualizer.py",
> line 118, in loadImageOnScreen
> im = Image.open(image_file)
> File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1976, in open
> return factory(fp, filename)
> File "/usr/lib/python2.7/dist-packages/PIL/ImageFile.py", line 91, in
> __init__
> self._open()
> File "/usr/lib/python2.7/dist-packages/PIL/XpmImagePlugin.py", line 93, in
> _open
> raise ValueError, "cannot read this XPM file"
> : cannot read this XPM file
> Many thanks,
> Suhaila
>
> --
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Error running Contact Map Visualizer Plugin

2012-03-13 Thread Tsjerk Wassenaar
Hi Suhaila,

mogrify modifies in-place, causing a mismatch between the extension
and the format. I guess that the script decides based on the
extension, and thus fails. Better is to use convert:

convert contactmap.xpm contactmap.png

Do make sure that the conversion goes well. I'm not exactly sure
whether Gromacs XPM files are properly processed by Imagemagick.

Cheers,

Tsjerk

On Tue, Mar 13, 2012 at 2:05 PM, Suhaila Haji Mohd Hussin
 wrote:
> Hello Tsjerk,
>
> When we run the plugin the dialog box is asking contact map to be in either
> png or jpg format only. So I used ImageMagick to convert it and run the
> following commands:
>
> mogrify -format jpg *.xpm
>
> or
>
> mogrify -format png *.xpm
>
> Cheers,
> Suhaila
>
>> Date: Tue, 13 Mar 2012 14:01:21 +0100
>> Subject: Re: [PyMOL] Error running Contact Map Visualizer Plugin
>> From: tsje...@gmail.com
>> To: bell_beaut...@hotmail.com
>> CC: pymol-users@lists.sourceforge.net
>
>>
>> Hi Suhaila,
>>
>> It looks like it's trying to load the XPM file, in stead of the
>> jpg/png. How did you invoke Pymol and what commands did you give?
>>
>> Cheers,
>>
>> Tsjerk
>>
>> On Tue, Mar 13, 2012 at 1:49 PM, Suhaila Haji Mohd Hussin
>>  wrote:
>> > Hello everyone especially to people who have used Contact Map Visualizer
>> > plugin before.
>> >
>> > Please refer the link below for more details of the issue:
>> > http://www.pymolwiki.org/index.php/Contact_map_visualizer
>> >
>> > In that link I managed  to generate the contact map successfully and
>> > converted the format from xpm to either jpg or png.
>> >
>> > When I loaded the contact map it was alright but after then as I
>> > loaded a
>> > pdb file that generates the contact map it gives me the following error
>> > instead of displaying the contact map which is shown in the link.
>> >
>> > Please help me what's this error all about?
>> >
>> > Error: 1
>> >  Exception in Tk callback
>> > Function:  at 0xa180cdc> (type: )
>> > Args: ()
>> > Traceback (innermost last):
>> > File "/usr/lib/python2.7/dist-packages/Pmw/Pmw_1_3/lib/PmwBase.py", line
>> > 1747, in __call__
>> > return apply(self.func, args)
>> > File
>> > "/usr/lib/pymodules/python2.7/pmg_tk/startup/contact_map_visualizer.py",
>> > line 54, in 
>> > self.menuBar.addmenuitem('Plugin', 'command','Contact Map
>> > Visualizer',label
>> > = 'Contact Map Visualizer',command = lambda s=self :
>> > getImageLocation(s))
>> > File
>> > "/usr/lib/pymodules/python2.7/pmg_tk/startup/contact_map_visualizer.py",
>> > line 68, in getImageLocation
>> > getPDBLocation(self)
>> > File
>> > "/usr/lib/pymodules/python2.7/pmg_tk/startup/contact_map_visualizer.py",
>> > line 83, in getPDBLocation
>> > loadImageOnScreen(self.file.name, self.pdbFile.name)
>> > File
>> > "/usr/lib/pymodules/python2.7/pmg_tk/startup/contact_map_visualizer.py",
>> > line 118, in loadImageOnScreen
>> > im = Image.open(image_file)
>> > File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1976, in open
>> > return factory(fp, filename)
>> > File "/usr/lib/python2.7/dist-packages/PIL/ImageFile.py", line 91, in
>> > __init__
>> > self._open()
>> > File "/usr/lib/python2.7/dist-packages/PIL/XpmImagePlugin.py", line 93,
>> > in
>> > _open
>> > raise ValueError, "cannot read this XPM file"
>> > : cannot read this XPM file
>> > Many thanks,
>> > Suhaila
>> >
>> >
>> > --
>> > Keep Your Developer Skills Current with LearnDevNow!
>> > The most comprehensive online learning library for Microsoft developers
>> > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> > Metro Style Apps, more. Free future releases when you subscribe now!
>> > http://p.sf.net/sfu/learndevnow-d2d
>> > ___
>> > PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> > Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>
>>
>>
>> --
>> Tsjerk A. Wassenaar, Ph.D.
>>
>> post-doctoral researcher
>> Molecular Dynamics Group
>> * Groningen Institute for Biomolecular Research and Biotechnology
>> * Zernike Institute for Advanced Materials
>> University of Groningen
>> The Netherlands



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.n

Re: [PyMOL] Query on 'Select group for analysis' for Contact Map Visualizer Plugin

2012-03-19 Thread Tsjerk Wassenaar
Hi Suheila,

The CMV requires the contact map and the structure to match. So to get
what you want, it's easiest to load the structure in pymol, and save
only the part you want to analyze:

save helix.pdb, ss h
save sheet.pdb, ss s

Then you can run g_mdmat on each of those, and load the result back in pymol.

Hope it helps,

Tsjerk

On Mon, Mar 19, 2012 at 6:20 PM, Suhaila Haji Mohd Hussin
 wrote:
> Hello especially for those who are experienced using Contact Map Visualizer
> Plugin. About generating a contact map, after typing the following command
> as shown:
>
> g_mdmat -f 2p31.pdb -s 2p31.pdb -mean contact-map.xpm
>
> It gives us a list of group selection to analyze such as below:
>
> Select group for analysis
> Group 0 ( System) has 2616 elements
> Group 1 ( Protein) has 2470 elements
> Group 2 ( Protein-H) has 2470 elements
> Group 3 ( C-alpha) has 314 elements
> Group 4 ( Backbone) has 934 elements
> Group 5 ( MainChain) has 1246 elements
> Group 6 ( MainChain+Cb) has 1540 elements
> Group 7 ( MainChain+H) has 1246 elements
> Group 8 ( SideChain) has 1224 elements
> Group 9 ( SideChain-H) has 1224 elements
> Group 10 ( Prot-Masses) has 2470 elements
> Group 11 ( non-Protein) has 146 elements
> Group 12 ( Ion) has 2 elements
> Group 13 ( CL) has 2 elements
> Group 14 ( Water) has 144 elements
> Group 15 ( SOL) has 144 elements
> Group 16 ( non-Water) has 2472 elements
> Group 17 ( Water_and_ions) has 146 elements
>
> My question is that is it possible to modify that group selection? I want to
> add in group analysis on alpha helix & beta sheet.
> For example Group 18 (Alpha helix) has 999 elements.
>
> If it is possible? How & where can I do that?
>
> Hope you reply a.s.a.p
>
> Many thanks,
> Suhaila
>
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Editing of the pdb structure

2012-03-20 Thread Tsjerk Wassenaar
Hi James,

In addition to Thomas' answer... What is _wrong_ about the TER
statement? Your chain is broken, indicated by the nonconsecutive
numbers. That means you have two distinct molecules, and they are
separated by a TER statement. Doesn't seem wrong. Yeah, they might be
the same chain, but having a broken chain without considering them as
separate molecules seems more wrong to me.

Cheers,

Tsjerk

On Tue, Mar 20, 2012 at 8:07 AM, James Starlight  wrote:
> Dear PyMol users!
>
>
> After editing of my pdb files by means of PyMol I've noticed that some of my
> structures contain of wrong TER enties in the body of the pdb files. In all
> cases I save my processed pdb file by the PyMol context menu bar.
> Below you can find xxample of processed file with the wrong TER enty:
>
> ATOM   1048  C   GLN A 148  62.717  15.038  24.185  1.00159.20
> C
> ATOM   1049  O   GLN A 148  62.170  16.003  24.721  1.00160.85
> O
> ATOM   1050  CB  GLN A 148  60.966  14.990  22.391  1.00157.41
> C
> ATOM   1051  CG  GLN A 148  60.245  14.214  21.299  1.00164.79
> C
> ATOM   1052  CD  GLN A 148  61.187  13.683  20.234  1.00171.18
> C
> ATOM   1053  OE1 GLN A 148  62.378  13.993  20.230  1.00175.57
> O
> ATOM   1054  NE2 GLN A 148  60.654  12.880  19.321  1.00174.45
> N
> ATOM   1055  N   PRO A 149  63.997  14.705  24.415  1.00152.79
> N
> ATOM   1056  CA  PRO A 149  64.879  15.450  25.320  1.00137.09
> C
> ATOM   1057  C   PRO A 149  65.073  16.892  24.868  1.00130.60
> C
> ATOM   1058  O   PRO A 149  65.669  17.672  25.611  1.00127.66
> O
> ATOM   1059  CB  PRO A 149  66.204  14.689  25.221  1.00136.58
> C
> ATOM   1060  CG  PRO A 149  65.828  13.324  24.755  1.00144.26
> C
> ATOM   1061  CD  PRO A 149  64.668  13.530  23.836  1.00151.11
> C
> TER    1062  PRO A 149
> ATOM   1063  N   GLY A 158  65.079   6.711  35.576  1.00221.82
> N
> ATOM   1064  CA  GLY A 158  63.944   7.519  35.982  1.00219.41
> C
> ATOM   1065  C   GLY A 158  62.683   6.698  36.169  1.00218.58
> C
> ATOM   1066  O   GLY A 158  62.260   6.442  37.297  1.00218.85
> O
> ATOM   1067  N   CYS A 159  62.080   6.285  35.059  1.00216.88
> N
> ATOM   1068  CA  CYS A 159  60.855   5.496  35.100  1.00213.74
> C
> ATOM   1069  C   CYS A 159  61.030   4.163  34.379  1.00214.80
> C
> ATOM   1070  O   CYS A 159  60.118   3.336  34.354  1.00213.86
> O
> ATOM   1071  CB  CYS A 159  59.694   6.277  34.481  1.00211.79
> C
> ATOM   1072  SG  CYS A 159  59.342   7.859  35.283  1.00233.24
> S
> ATOM   1073  N   GLY A 160  62.206   3.961  33.794  1.00216.16
> N
> ATOM   1074  CA  GLY A 160  62.493   2.743  33.059  1.00217.18
> C
> ATOM   1075  C   GLY A 160  61.866   2.749  31.679  1.00215.69
> C
> ATOM   1076  O   GLY A 160  60.981   3.557  31.395  1.00214.72
> O
>
> In that example you can see the wrong string
> TER    1062  PRO A 149
>
> Some of my programs uncorrectly recognise such TER enties as the end of one
> CHAIN and bigining of the another after TER. Could you tell me how I could
> avoid of such TER after processing of my pdbs via PyMol ?
>
> Thanks for help
>
>
> James
>
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Editing of the pdb structure

2012-03-20 Thread Tsjerk Wassenaar
Hi Thomas,

'Wrong', certainly in the context it was given in, is a statement of
judgment. It suggest that there is a failure in the functioning, and
is a criticism to the developer, becoming a wrongdoer. My argument is,
that the answer given (with TER statements) is not wrong, but from a
chemical and biological point of view, and in light of the PDB format,
is actually more correct. It may be inconvenient for post-processing
with some other tools, but that is easily taken care of by changing a
setting (unset use_ter_records), or by post-processing (sed -i /TER/d
file.pdb).

Cheers,

Tsjerk

On Tue, Mar 20, 2012 at 1:14 PM, Thomas Holder
 wrote:
> On 03/20/2012 11:35 AM, Tsjerk Wassenaar wrote:
>>
>> In addition to Thomas' answer... What is _wrong_ about the TER
>> statement? Your chain is broken, indicated by the nonconsecutive
>> numbers. That means you have two distinct molecules, and they are
>> separated by a TER statement. Doesn't seem wrong. Yeah, they might be
>> the same chain, but having a broken chain without considering them as
>> separate molecules seems more wrong to me.
>
>
> depends on circumstances. Many algorithms (like alignment/superposition)
> work fine even with gapped chains. There are some applications which stop
> reading a PDB file on the first TER record, like TMalign. So when preparing
> input for TMalign with PyMOL, you most likely want to skip any TER records.
>
> Cheers,
>  Thomas
>
>
> --
> Thomas Holder
> MPI for Developmental Biology
> Spemannstr. 35
> D-72076 Tübingen



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Editing of the pdb structure

2012-03-20 Thread Tsjerk Wassenaar
Shucks! So much for trying to keep the developer out of the wind. But
he's a wrongdoer by PDB definitions anyway! So it would be best to
modify the behaviour concerning writing of TER records. Feel free to
file it as suggestion.

Gotta love polemics! -- Next time I'll manage, David. Next time... :p

Tsjerk

On Tue, Mar 20, 2012 at 2:48 PM, David Hall  wrote:
> On Tue, Mar 20, 2012 at 8:44 AM, Tsjerk Wassenaar  wrote:
>> Hi Thomas,
>>
>> 'Wrong', certainly in the context it was given in, is a statement of
>> judgment. It suggest that there is a failure in the functioning, and
>> is a criticism to the developer, becoming a wrongdoer. My argument is,
>> that the answer given (with TER statements) is not wrong, but from a
>> chemical and biological point of view, and in light of the PDB format,
>> is actually more correct.
>
> The PDB format says:
> The TER records occur in the coordinate section of the entry, and
> indicate the last residue presented for each polypeptide and/or
> nucleic acid chain for which there are determined coordinates. For
> proteins, the residue defined on the TER record is the
> carboxy-terminal residue; for nucleic acids it is the 3'-terminal
> residue.
> ( http://www.wwpdb.org/documentation/format33/sect9.html#TER )
>
> Chain breaks in crystal structures are generally not the
> carboxy-terminal residues.
>
> -David



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Error running Contact Map Visualizer Plugin

2012-03-20 Thread Tsjerk Wassenaar
Hi Suheila,

What were the exact commands you used, and what error did it come up with?
Just saying you tried mogrify and convert and the error was still there
isn't very informative to us.

Cheers,

Tsjerk

On Mar 18, 2012 2:39 PM, "Suhaila Haji Mohd Hussin" <
bell_beaut...@hotmail.com> wrote:

 I already got few replies regarding this issue but I still haven't solved
and I don't even have the slightest idea what's causing it.

I tried mogrify, convert using ImageMagick, none of them works still giving
me the following errors when after loading contact map & pdb file on
Contact Map Visualizer Plugin.

Any idea at all please let me know.

Error: 1  Exception in Tk callback Function:
 at 0...

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] problem in changing object names

2012-03-20 Thread Tsjerk Wassenaar
Hi,

Why can't you use set_name tun1, ..., etc? The attempt trying to change
names is quite odd, and won't do what you want anyway.
You could use

basename="your_tag"
cmd.set_name(cmd.get_object_list()[0], basename+"_subtag")
... and so on.

Cheers,

Tsjerk

On Mar 21, 2012 6:56 AM, "Sajeewa Pemasinghe"  wrote:

Hi everyone,

I have a pml script by which I am trying to change 6 object names. These
are on molecular tunnels. The 6 object names are

Total_protein
start (starting point of the tunnels)
crisscross
tun1 (tunnel1)
tun2 (tunnel2)
tun3 (tunnel3)

Objects 1,4,5 and 6 can be accessed
as (cmd.get_object_list())[0], (cmd.get_object_list())[1],
(cmd.get_object_list())[2], (cmd.get_object_list())[3]

My script is

set_name crisscross,E125Dch113nscris
set_name start,E125Dch113nsst
(cmd.get_object_list())[0]=E125Dch113ns
(cmd.get_object_list())[1]=E125Dch113nstn1
(cmd.get_object_list())[2]=E125Dch113nstn2
(cmd.get_object_list())[3]=E125Dch113nstn3

Although the first two lines work the other lines give errors as

(cmd.get_object_list())[0]=E125Dch113ns
Traceback (most recent call last):
  File "C:\Program Files (x86)\PyMOL\PyMOL/modules\pymol\parser.py", line
464, in parse
exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
  File "", line 1, in 
NameError: name 'E125Dch113ns' is not defined
PyMOL>(cmd.get_object_list())[1]=E125Dch113nstn1
Traceback (most recent call last):
  File "C:\Program Files (x86)\PyMOL\PyMOL/modules\pymol\parser.py", line
464, in parse
exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
  File "", line 1, in 
NameError: name 'E125Dch113nstn1' is not defined
PyMOL>(cmd.get_object_list())[2]=E125Dch113nstn2
Traceback (most recent call last):
  File "C:\Program Files (x86)\PyMOL\PyMOL/modules\pymol\parser.py", line
464, in parse
exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
  File "", line 1, in 
NameError: name 'E125Dch113nstn2' is not defined

changing the names in this iterative fashion is really needed for me coz I
am creating the pml script iteratively using a java program for 240 files.
Could you please give me suggestions for modifications to iteratively
change the object names. This would help my work really big.

Thank you

Sajeewa


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Editing of the pdb structure

2012-03-21 Thread Tsjerk Wassenaar
Hi James,

Pymol adds a TER statement at the end of each continuous piece of the protein.

Cheers,

Tsjerk

2012/3/21 James Starlight :
> Hi Tsjerk,
>
> I'm not quite understood if pymol adds TER enty after residues wich consist
> of missing atoms or in the place with the missing residues  ( e.g in loops
> of GPCRs or other flexible regions) ?
>
> James
>
> 21 марта 2012 г. 10:38 пользователь Tsjerk Wassenaar 
> написал:
>
>> Hi James,
>>
>> Broken refers to non-continuity of a chain, i.e. missing residues. Broken
>> does not mean wrong... But for the rest, I admitted to be wrong with my
>> arguments already :p
>>
>> Cheers,
>>
>> Tsjerk
>>
>> On Mar 21, 2012 6:47 AM, "James Starlight"  wrote:
>>
>> Hi Tsjerk!
>>
>> It's very strange because I've obtained all same structures with the same
>> TER statements in the body of the pdb file in the case of processing of
>> x-ray structures of GPCRs ( It's different membrane proteins solved by the
>> different lab groups in the different time ). So it's strange that all of
>> those structures were broken!
>>
>> James
>>
>> 20 марта 2012 г. 14:35 пользователь Tsjerk Wassenaar 
>> написал:
>>
>> > > Hi James, > > In addition to Thomas' answer... What is _wrong_ about
>> > > the TER > statement? Your ...
>>
>>
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Viewport and ray

2012-03-29 Thread Tsjerk Wassenaar
Hi Gudrun,

If you raytrace an image it is written to disk and loaded into the
viewport. If the imge is larger than the viewport it is displayed
smaller with the real resolution mentioned underneath. If you save the
image, using 'png', it is saved in the large format, without the black
padding.

Cheers,

Tsjerk

On Thu, Mar 29, 2012 at 1:12 PM, Gudrun Lotze  wrote:
> Dear Pymol-Experts,
> a while ago I had problems with the ray command. It always showed me a black 
> frame with mentioning at the bottom the image size.
> The group advised me to use viewport.
>
> viewport 800, 600
>
> ray 800, 600
>
>
> This works and I don't get this black frame, however if I try different 
> values, for example 1200, 1000 I still get the black frame. Everything fits 
> nicely on the screen and I don't know where this black box comes really in 
> the other cases.
> I would like to use a higher resolution than 800, 600 without the black box.
>
> Thank you very much for your help.
> Kind regards
> Gudrun
>
>
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Periodic boundary conditions?

2012-05-14 Thread Tsjerk Wassenaar
Hi Boris,

PBC have not yet found their way to the main pymol code. What kind of stuff
do you need? lattice.py is quite convenient for shifting. For (a)symmetry
mates, you can use the scripts suggested by Thomas. If you need something
else, pbc operations are not very hard to script.

Cheers,

Tsjerk

On May 14, 2012 6:08 PM, "Thomas Holder" 
wrote:

Hi Boris,

if you want to visualize neighboring cells, have a look at one of these
script from the PyMOLWiki:
http://pymolwiki.org/index.php/Supercell
http://pymolwiki.org/index.php/SuperSym

Or for symmetry mates within a given radius:
http://pymolwiki.org/index.php/Symexp

Hope that helps.

Cheers,
  Thomas

On 05/14/2012 05:04 PM, Boris Kheyfets wrote: > Hello PyMOL users! > > I
was wondering if there's a...
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen

--
Live Security Virtua...
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Periodic boundary conditions?

2012-05-15 Thread Tsjerk Wassenaar
Hi Boris,

run lattice.py
create copy1,all
shift 1,0,0,copy1
create copy2, copy1
shift 1,0,0,copy2

As a side note, don't trust your eyes too much when estimating
homogeneity. Humans are strongly inclined to see patterns, even if
they're not there. You probably want to calculate densities on a grid
and get some statistics on mean density and standard deviation.

Cheers,

Tsjerk

On Tue, May 15, 2012 at 4:10 PM, Boris Kheyfets  wrote:
> Thanks to Tsjerk and Thomas
>
> supercell.py almost fits to my needs: is there a way I can replicate
> the cell to look exactly the same - I don't want to change the
> coloring? I tried to call it with
> supercell 2,1,1, color=None
> but it doesn't help.
>
> SuperSymPlugin12.py: can't make cctbx work: Oops! SuperSym requires
> cctbx and numeric python to function. Please install these. Error:
> unable to initialize plugin 'SuperSymPlugin12'.
>
> lattice.py: that shift the structure. I want to display some more cells of it.
>
> With great respect,
> Boris.
>
> P.S. I have a cell - I'd like to see if its homogeneous. For that I
> need to put several cells in row - along x,y and z directions.
>
> On Tue, May 15, 2012 at 12:20 AM, Tsjerk Wassenaar  wrote:
>> Hi Boris,
>>
>> PBC have not yet found their way to the main pymol code. What kind of stuff
>> do you need? lattice.py is quite convenient for shifting. For (a)symmetry
>> mates, you can use the scripts suggested by Thomas. If you need something
>> else, pbc operations are not very hard to script.
>>
>> Cheers,
>>
>> Tsjerk
>>
>> On May 14, 2012 6:08 PM, "Thomas Holder" 
>> wrote:
>>
>> Hi Boris,
>>
>> if you want to visualize neighboring cells, have a look at one of these
>> script from the PyMOLWiki:
>> http://pymolwiki.org/index.php/Supercell
>> http://pymolwiki.org/index.php/SuperSym
>>
>> Or for symmetry mates within a given radius:
>> http://pymolwiki.org/index.php/Symexp
>>
>> Hope that helps.
>>
>> Cheers,
>>   Thomas
>>
>> On 05/14/2012 05:04 PM, Boris Kheyfets wrote: > Hello PyMOL users! > > I was
>> wondering if there's a...
>>
>> Thomas Holder
>> MPI for Developmental Biology
>> Spemannstr. 35
>> D-72076 Tübingen
>>
>> --
>> Live Security Virtua...



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] syntax for lone pair removal

2012-05-30 Thread Tsjerk Wassenaar
Hey,

Of course you can also escape the asterisk (just for the record):

remove resn \*\*\*\*

Cheers,

Tsjerk

On Wed, May 30, 2012 at 8:28 AM, Thomas Holder
 wrote:
> Hi Martin,
>
>> when visualising data out of a GOLD docking run, where the software
>> has added lone pairs to active site residues and ligands is it
>> possible to remove them post hoc in Pymol?  The "atoms" look like:
>>
>> 62         45.6415  30.9229  12.1185 LP             1 <1>
>> 0.
>
> the atom_type field after the x/y/z coordinates says "LP", which will be
> loaded as the element symbol into PyMOL. So this should work:
>
> remove elem LP
>
>> in the output .mol2 files so the  "atom" names are clearly not
>> going to be helpful in a command line situation. For a single ligand
>> pose it's not too bad doing it by hand but for multiple poses of
>> multiple ligands it gets pretty old pretty fast. Usually I just tell
>> people to rerun the docking with the GOLD software told to turn the
>> LPs off but am after a post hoc solution if possible as people can't
>> always get on to our licenses fast enough to repeat jobs.
>>
>> GOLD also puts the extra  protein LPs into the output ligand file,
>> not into a modded protein file. those lines in the output ligand
>> files look like:
>>
>> 52.0949   25.2031   14.8408 LP  0  0  0  0  0  0  0  0  0  0  0  0  #
>> atno 4332 bound_to 4006
>
> this is a SDF file, right? So you can remove by name:
>
> remove name LP
>
> Cheeres,
>   Thomas
>
> --
> Thomas Holder
> MPI for Developmental Biology
> Spemannstr. 35
> D-72076 Tübingen
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


[PyMOL] Map custom function to mouse

2012-06-08 Thread Tsjerk Wassenaar
Beautiful people,

I was trying to make an image with a surface, with part of the surface
opened to show the inside. I tried to clip the surface by hiding
everything within a distance from a pseudoatom, but I ended up editing
by hand selecting atoms with the mouse, left click, hide, surface. I
was wondering how hard it would be to temporarily map a toggle (show
surface/hide surface of atom/residue/molecule pointed at) to a mouse
button. Anyone any ideas?

Cheers,

Tsjerk

-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Map custom function to mouse

2012-06-09 Thread Tsjerk Wassenaar
Hi Thomas,

The problem is a bit more complicated than that. I just want to be able to
turn on/off some representation by just clicking the atom. I don't want to
select, press key, deselect. Especially for carving surfaces or meshes:
click atom to turn off and click again to turn on if the result is not
good. Since it's not always immediately clear which triangles correspond to
which atoms, this seems to be the best way to carve manually.

Cheers,

Tsjerk

On Jun 9, 2012 10:31 AM, "Thomas Holder" 
wrote:

Hi Tsjerk,

you could map keys, so hiding surface of a atom/residue/... breaks down to
a click + key press operation.

cmd.set_key('F1', cmd.show, ('surface', 'sele'))
cmd.set_key('F2', cmd.hide, ('surface', 'sele'))

If you really want to map the mouse click operation you need to write a
wizard, which is more work.

Cheers,
 Thomas

Tsjerk Wassenaar wrote, On 06/09/12 07:24:

> > Beautiful people, > > I was trying to make an image with a surface,
with part of the surface > ...
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Map custom function to mouse

2012-06-09 Thread Tsjerk Wassenaar
... so a wizard seems the way to go.

Thnx,

T.

On Jun 9, 2012 10:56 AM, "Tsjerk Wassenaar"  wrote:

Hi Thomas,

The problem is a bit more complicated than that. I just want to be able to
turn on/off some representation by just clicking the atom. I don't want to
select, press key, deselect. Especially for carving surfaces or meshes:
click atom to turn off and click again to turn on if the result is not
good. Since it's not always immediately clear which triangles correspond to
which atoms, this seems to be the best way to carve manually.

Cheers,

Tsjerk

> > On Jun 9, 2012 10:31 AM, "Thomas Holder" 
wrote: > > Hi Tsjerk, ...

> > Beautiful people, > > I was trying to make an image with a surface,
with part of the surface > ...

> > Thomas Holder > MPI for Developmental Biology > Spemannstr. 35 >
D-72076 Tübingen
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] writing out the surface

2012-06-11 Thread Tsjerk Wassenaar
Hi Michael,

The answer used to be "you can write out the surface as mesh in vrml or
povray format, from which you can extract the vertices". I think it's still
the proper answer.

Cheers,

Tsjerk

On Jun 11, 2012 5:26 PM, "Michael Lerner"  wrote:

Hi all,

If I have a surface representation, is there currently a way to write it
out as points (perhaps with a desired spacing) to a file? I know that the
answer used to be no, but I thought I'd check just in case there was a new
function that I didn't know about.

Cheers,
-Michael

-- 
Michael Lerner
Department of Physics and Astronomy
Earlham College - Drawer 111
801 National Road West
 Richmond, IN   47374-4095


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Usage Specification

2012-06-14 Thread Tsjerk Wassenaar
Hi Sean,

The pymol syntax for getting help on a command is "help command". I
think it is a wrapper around the python help function, for which the
syntax is "help(command)". In your case, it would only show something
like:

test(*args,**kwargs)

You can write a docstring, e.g. similar to the ones in
modules/pymol/cmd.py in the pymol directory, to have more help with
your function. There you can also write the syntax and the function
arguments. These can not be inferred from the argument list itself,
since you use *args and **kwargs there. In case you want 'test ?' to
give help, you have to add a conditional to your function, e.g.:

if "?" in args:
  print helptext
  return

Hope it helps,

Tsjerk
On Thu, Jun 14, 2012 at 6:00 PM, Sean Law  wrote:
> Hi PyMOL Community,
>
> I have a PyMOL script that I have written that starts with the following
> kind of format:
>
> -
> from pymol import cmd
> from re import *
>
> def test (*args, **kwargs):
>
>   var1=0
>   sel=""
>
>   for key in kwargs:
>     if (key == "var1"):
>       var1=int(kwargs["var1"])
>     elif (key == "selection"):
>       sel=kwargs["selection"]
>     else:
>       continue
>
>   while (len(args)>=1):
>     args.pop(0)
>
>   return
> cmd.extend("test", test)
>
> --
>
>
> I've noticed that in this format the usage output (i.e. if I do "test ?")
> does not contain any valuable information:
>
> test ?
> Usage: test
>
> Thus, I was hoping that there was an easy way that I can directly specify
> what the Usage output says.  I was hoping that it would say something like:
>
> Usage: test [var1=0 [, selection=""]]
>
> Any suggestions would be greatly appreciated.  Thanks.
>
> Sean
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] 60-mer virus capsid (need computing power!)

2012-06-14 Thread Tsjerk Wassenaar
Hi Shane,

I've been playing with a virus 60mer on an intel core i7 workstation with
6Gb memory with good response. Just make sure you use the latest incentive
or open source version and have a good graphics card.

Cheers,

Tsjerk

On Jun 14, 2012 11:49 PM, "Shane Neeley"  wrote:

Hi,

Does anyone use pymol for very large structures, such as a full virus
60-mer capsid? If so, what processing power, memory, graphics card, etc. do
you need to render these large files and manipulate them without any
slowing? PyMol takes about 1 minute to think after trying to spin one of
these full capsids, and that is on a dual-core 8gb ram laptop.

Is a 12-core mac like this overkill?
http://store.apple.com/us_smb_78313/configure/MD771LL/A

Has anyone built other machines to do this sort of work?

Appreciate your input,

Shane Neeleu


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] 3D printing question

2012-06-19 Thread Tsjerk Wassenaar
Hi Darrell,

> When using the plugin, I find it useful to use smooth loops and smooth
> strands. Unfortunately, the script puts the supporting struts at the
> C-alpha positions, not the splined positions that you get with smoothing.
> The trick is to "show" a "line" representation of just the C-alpha at the
> ends of the strut and use the "sidechain helper" option.

The trick would be modifying the structure to have the C-alphas placed
at the spline control points. Not that hard to do, really.

Cheers,

Tsjerk


-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Very strange problem

2012-07-20 Thread Tsjerk Wassenaar
Hi Malai,

Check whether all residues have unique identifiers (residue id + chain id).
I often see this happen for multiple chains with no or identical
identifiers, in which different residues share the same number.

Cheers,

Tsjerk

On Jul 21, 2012 12:46 AM, "Jason Vertrees" 
wrote:

Hi Malai,

What structure? Can we see it? (Feel free to send it to me if you can share
it.)

Cheers,

-- Jason

On Fri, Jul 20, 2012 at 3:09 PM, Malai  wrote: > Hi
Pymol users, > > I am us...
>
--
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



--
Jason Vertrees, PhD
PyMOL Product Manager
Schrödinger, LLC

(e) jason.vertr...@schrodinger.com
(o) +1 (603) 374-7120

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Save png with ray not working

2012-09-13 Thread Tsjerk Wassenaar
Hi Andrei,

You only specified the width. The next argument should then be the height,
for which you filled in 'ray'. So pymol tries to make a number of that,
which fails.

Cheers,

Tsjerk

On Sep 13, 2012 7:45 PM, "Andrei Tudor"  wrote:

Hello,

I installed pymol a few days ago from source. Everything went smothly,
except for when I tried to save a png image.
I used the command: ">png image.png, 1920, ray"
This gives the following error:

PyMOL>png test.png, 1920, ray
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pymol/parser.py", line 254,
in parse
self.result=apply(layer.kw[0],layer.args,layer.kw_args)
  File "/usr/local/lib/python2.7/dist-packages/pymol/exporting.py", line
338, in png
r = _self._png(str(filename),int(width),int(height),float(dpi),
ValueError: invalid literal for int() with base 10: 'ray'

I don't really know if this is a problem with my python libraries or with
pymol. If I do ">ray" it works without a problem, as works ">png image.png,
1920"

Thanks,
Andrei

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Use arrows to switch between models

2012-09-20 Thread Tsjerk Wassenaar
Hi :)

You can also add

cmd.disable('all')
cmd.enable(cur_obj)

To have all other objects turned off. This is one I'm definitely going to use :)

Cheers,

Tsjerk

On Thu, Sep 20, 2012 at 6:32 PM, Jason Vertrees
 wrote:
> Hi Martin,
>
>> Is it possible to somehow assign "page up" or "page down" keys to switch
>> from one loaded model to the next one in the PyMOL models list?
>> This would be useful because I often have several similar models listed
>> and in doing so it would be easier and convenient to identify changes
>> within them.
>
> How about something like http://pymolwiki.org/index.php/ObjectFocus.
> It's cool what you can do with PyMOL and 8 minutes of coding.
>
> Two changes to the script you might want:
>   * replace 'orient' with 'zoom'
>   * don't animate the change, remote ',animate=1' from the orient command.
>
> Cheers,
>
> -- Jason
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrödinger, Inc.
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://ad.doubleclick.net/clk;258768047;13503038;j?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Obtain the number of molecule in the first hydration shell of a peptide.

2012-09-28 Thread Tsjerk Wassenaar
Hi Stephane,

print cmd.count_atoms("byres resn URE within 3.5 of peptide")/8

Cheers,

Tsjerk


On Fri, Sep 28, 2012 at 2:59 PM, ABEL Stephane 175950
 wrote:
> Dear pymol users,
>
> I would like to obtain with Pymol (v1.3) the number of urea molecules in the 
> first shell of a peptide. To do this I have defined the object urea as 
> following
>
> select UREA, resn URE
>
> and used the following cutoff for the first hydration shell:
>
> select UREA_firstshell, UREA within 3.5 of peptide
>
> And finally used the command:
>
> print cmd.count_atoms("UREA_firstshell") to obtain the number of atom at the 
> distance of 3.5 A from the peptide.
>
> Of course, these commands work well, but my aim is to obtain the number of 
> molecules instead of the number of atoms.  How to do  that ?
>
> For info,  urea has 8 atoms.
>
> Thank you for you help
>
> Stephane
> --
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Biocomputing Group
Department of Biological Sciences
2500 University Drive NW
Calgary, AB T2N 1N4
Canada

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Obtain the number of molecule in the first hydration shell of a peptide.

2012-09-28 Thread Tsjerk Wassenaar
print len(set([(i.resn, i.resi) for i in cmd.get_model("resn URE").atom])) # :-)

Cheers,

Tsjerk

On Fri, Sep 28, 2012 at 4:37 PM, Jason Vertrees
 wrote:
> Hi Stephane,
>
> Tsjerk as usual provides a clever answer. However, if in any case a
> urea goes missing an atom, maybe due to experimental reasons, or you
> want to use this technique for something other than urea then Tsjerk's
> answer will need to be modified.
>
> I offer a slightly different solution. I've written a script that
> counts distinct molecular objects in a given selection. You can
> download it from the PyMOLWiki here,
>
> http://www.pymolwiki.org/index.php/Count_molecules_in_selection.
>
> See the examples to learn how to use it.
>
> Tsjerk's solution will always be faster. Mine will be more flexible.
> Use what works for you.
>
> Cheers,
>
> -- Jason
>
> On Fri, Sep 28, 2012 at 10:03 AM, ABEL Stephane 175950
>  wrote:
>> for the pymol-users mailing list archive and to close my message
>>
>> Tsjerk Wassenaar gave the command :
>>
>> print cmd.count_atoms("byres resn URE within 3.5 of peptide")/8. it works !!!
>>
>> Thanks to him !!!
>>
>> Bye
>>
>> Stephane
>>
>> --
>>
>> Message: 8
>> Date: Fri, 28 Sep 2012 12:59:27 +
>> From: ABEL Stephane 175950 
>> Subject: [PyMOL] Obtain the number of molecule in the first hydration
>> shell of a peptide.
>> To: "pymol-users@lists.sourceforge.net"
>> 
>> Message-ID:
>> <3e39b768bb199548ab18f7289e7534af02c4d...@exdag0-b0.intra.cea.fr>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Dear pymol users,
>>
>> I would like to obtain with Pymol (v1.3) the number of urea molecules in the 
>> first shell of a peptide. To do this I have defined the object urea as 
>> following
>>
>> select UREA, resn URE
>>
>> and used the following cutoff for the first hydration shell:
>>
>> select UREA_firstshell, UREA within 3.5 of peptide
>>
>> And finally used the command:
>>
>> print cmd.count_atoms("UREA_firstshell") to obtain the number of atom at the 
>> distance of 3.5 A from the peptide.
>>
>> Of course, these commands work well, but my aim is to obtain the number of 
>> molecules instead of the number of atoms.  How to do  that ?
>>
>> For info,  urea has 8 atoms.
>>
>> Thank you for you help
>>
>> Stephane
>>
>>
>> --
>>
>> --
>> Got visibility?
>> Most devs has no idea what their production app looks like.
>> Find out how fast your code is with AppDynamics Lite.
>> http://ad.doubleclick.net/clk;262219671;13503038;y?
>> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
>>
>> --
>>
>> ___
>> PyMOL-users mailing list
>> PyMOL-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pymol-users
>>
>>
>> End of PyMOL-users Digest, Vol 76, Issue 10
>> ***
>> --
>> Got visibility?
>> Most devs has no idea what their production app looks like.
>> Find out how fast your code is with AppDynamics Lite.
>> http://ad.doubleclick.net/clk;262219671;13503038;y?
>> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
>> ___
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>
>
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrödinger, Inc.
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>
> --
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/

Re: [PyMOL] question about biological units, states, etc.

2012-10-03 Thread Tsjerk Wassenaar
Hi Dave,

You can set the chain identifier for each object

alter object, chain="A"

And then you can create a new object

create alltogether, chain A+B+C+D

That object you can then use for fitting.

Hope it helps,

Tsjerk

On Wed, Oct 3, 2012 at 7:22 PM, Bourgaize David  wrote:
> Hello, all.
>
> First let me announce that I am not a PyMOL poweruser, and I have virtually
> no experience with crystallography and its data files. I have been plugging
> along using the PyMOLwiki as my knowledge-base for years, but cannot seem to
> wrap my head around certain issues.
>
> For example, 6pfk (phosphofructokinase) exists as a file that, when fetched,
> opens as a complete biological unit (a tetramer), with chains A, B, C, and
> D. However, 4pfk is only one subunit. When I then fetch 4pfk, type=pdb1 in
> order to obtain the biological unit, I can split_states and delete the
> original 4pfk. This leaves me with  a biological unit, but one in which each
> chain is its own object.
>
> Ultimately, I would like to be able to align/superimpose various parts of
> these two structures. Is there an easy way to do this, given that one is a
> single object with multiple chains, and the other is four separate objects?
> Or. Alternatively, is there a way to convert the 4pfk biological unit into a
> single object, with chains A, B, C, and D?
>
> Thanks-
>
> Dave Bourgaize
> Whittier College
>
> --
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Biocomputing Group
Department of Biological Sciences
2500 University Drive NW
Calgary, AB T2N 1N4
Canada

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Delete empty objects

2012-12-11 Thread Tsjerk Wassenaar
Hi Vitaly,

Try

for i in cmd.get_object_list(): cmd.get_model(i).get_coord_list() or
cmd.delete(i)

Ciao!

Tsjerk



On Tue, Dec 11, 2012 at 9:31 AM, V.V.  wrote:

> Hello,
> Is there a quick way to delete the objects that do not contain any atoms?
>
> Thank you in advance,
> Vitaly
>
>
> --
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Biocomputing Group
Department of Biological Sciences
2500 University Drive NW
Calgary, AB T2N 1N4
Canada
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] drawing a bond between the same Calpha atom in different states

2012-12-14 Thread Tsjerk Wassenaar
Hey :)

Can't resist the challenge...
For any given ensemble, you can draw a trace through the C-alphas using the
following lines, illustrated here for the NMR ensemble '1NMR':

# Get the structure
fetch 1nmr

# Get the number of states
n = cmd.count_states('1nmr')

# Collect the C-alpha coordinates
# This calls get_model for every state and extracts the coordinates for
every model-state
# The resulting list is transposed, such that each list entry contains the
coordinates for one C-alpha over all states
x=zip(*[cmd.get_model('1nmr and n. ca',state=i+1).get_coord_list() for i in
range(n)] )

# Now draw the traces by building a CGO model
cmd.load_cgo([i for j in x for u,v,f in zip(j,j[1:],range(r)) for i in
[9.0]+u+v+[0.1,1,1-(1.*f)/r,1-(1.*f)/r,1,1-(1.+f)/r,1-(1.+f)/r]],"trace")

The 9.0 is the CGO code for a cylinder (pymol.cgo.CYLINDER). The 0.1 is the
radius, and the following six values are the start and end RGB values,
which are related to the state number, such that they end up from white to
red. For more complex colors it would be nice to have a rgb() function that
would return a color according to some scheme, given a fraction, which
would make that last command

cmd.load_cgo([i for j in x for u,v,f in zip(j,j[1:],range(r)) for i in
[9.0]+u+v+[0.1]+rgb((1.*f)/r,scheme=...)+rgb((1.+f)/r,scheme=...)],"trace")

Hope it helps,

Tsjerk


On Thu, Dec 13, 2012 at 10:54 PM, Robert Campbell <
robert.campb...@queensu.ca> wrote:

> Hi,
>
> (replying to my own message)
>
> On Thu, 2012-12-13 15:52  EST,  Robert Campbell
>  wrote:
>
> > Hi Jon,
> >
> > On Thu, 2012-12-13 16:09  EST,  Jonathan Grimes <
> jonat...@strubi.ox.ac.uk>
> > wrote:
> >
> > >   Hi All,
> > >
> > >I have 2 different states of the same molecule..different
> > > conformations generated from MD, so the same number of Calpha atoms,
> > > with a direct 1:1 mapping between Calphas with the same residue
> > > numbering.
> > >
> > >I would like to draw a "bond" between equivalent C-alpha atoms, and
> I
> > > will then ramp colour along the bond, say blue-white-red.
> > >
> > >Could I get advice how to draw a bond between 2 Calpha atoms (same
> > > resi) from different states
> >
> > I have a script for drawing a cylinder (you can specify the radius and
> the
> > beginning and ending colors) between two atoms.  The script is at:
> >
> >
> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/draw_cylinder_cgo.py
> >
> > First "run" the script via the "File" menu or via the command line:
> >
> > run draw_cylinder_cgo.py
> >
> > You will then have two new functions defined "draw_cylinder" and
> > "draw_cylinder_cgo".  The former allows you to pick two atoms to draw the
> > cylinder between:
> >
> > draw_cylinder name, atom1, atom2, radius, start_color, end_color
> >
> > where each atom is a standard PyMOL selection (defaults to pk1 and
> > pk2) and color is a 3-element RGB tuple defining the color
> > of the cylinder (where each value of R, G and B is between 0 and 1
> > inclusive).  The colors default to (1,1,0).
> >
> >
> > Alternatively, draw_cylinder_cgo takes as arguments the start and end
> > coordinates of the vector in place of atom1 and atom2.
>
> I could add more instructions here.  You can specify the colours by
> name and if you have picked the atoms with the mouse you can easily do
> something like:
>
>   draw_cylinder dist1, start_color=red, end_color=yellow
>
> and it will default to using atom selections "pk1" and "pk2" and a radius
> of 0.1 A.
>
> Cheers,
> Rob
> --
> Robert L. Campbell, Ph.D.
> Senior Research Associate/Adjunct Assistant Professor
> Dept. of Biomedical & Molecular Sciences
> Botterell Hall Rm 644
> Queen's University,
> Kingston, ON K7L 3N6  Canada
> Tel: 613-533-6821
> http://pldserver1.biochem.queensu.ca/~rlc
>
>
> --
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Biocomputing Group
Department of Biological Sciences
2500 University Drive NW
Calgary, AB T2N 1N4
Canada
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2

Re: [PyMOL] drawing a bond between the same Calpha atom in different states

2012-12-14 Thread Tsjerk Wassenaar
Hi Jon,

You also have to update the three numbers before. So to go from white to
blue is

cmd.load_cgo([i for j in x for u,v,f in zip(j,j[1:],range(n)) for i in
[9.0]+u+v+[1.3,  1-(1.*f)/n,1-(1.*f)/n,1,   1-(1.+f)/n,1-(1.+f)/n,1
 ]],"trace")

If you want to go from blue to white to red, it's probably easiest to split
it in two:

a=n/2
b=n-n/2
cmd.load_cgo([i for j in x for u,v,f in zip(j,j[1:],range(n))[:a] for i in
[9.0]+u+v+[1.3,  (1.*f)/a,(1.*f)/a,1,   (1.+f)/a,(1.+f)/a,1  ]],"trace_a")
cmd.load_cgo([i for j in x for u,v,f in zip(j,j[1:],range(n))[a:] for i in
[9.0]+u+v+[1.3,  1,1-(1.*f-a)/b,1-(1.*f-a)/b,
1,1-(1.+f-a)/b,1-(1.+f-a)/b  ]],"trace_b")

For the capping, you can use spheres:

cmd.load_cgo([i for j in x for u,f in zip(j,range(n))[:a] for i in [6.0,
(1.*f)/a,(1.*f)/a,1,  7.0]+u+[1.3]],"spheres_a")
cmd.load_cgo([i for j in x for u,f in zip(j,range(n))[a:] for i in [6.0,
1,1-(1.*f-a)/b,1-(1.*f-a)/b,  7.0]+u+[1.3]],"spheres_b")

For more complex color schemes, you would definitely want a rgb function.

Hope it helps,

Tsjerk


On Fri, Dec 14, 2012 at 12:25 PM, Jonathan Grimes
wrote:

>
>   thanks  tsjerk
>
>ive been playing with the values at the end..and i can,t change it
> to go from
>white to blueor even red to blue
>
>i triedwhite to blueso 1,1,1 to 0,0, 1
>
> cmd.load_cgo([i for j in x for u,v,f in zip(j,j[1:],range(n)) for i in
> [9.0]+u+v+[1.3,1,1-(1.*f)/n,1-(1.*f)/n, 1-(1.+f)/n,1-(1.+f)/n,1  ]],"trace")
>
>so 1,1-(1.*f)/n,1-(1.*f)/n,  corresponds to 1,1,1where f/n is the
> fraction along the cylinder.
>
>   and then i changed the last 3 numbers to 1-(1.+f)/n,1-(1.+f)/n,1which
> i thought would go to 0 , 0 ,1
>
>but i get a bond but the color doesnt go smoothly from white to blue ??
>
>is there also a nice way to cap the cylinder so it had a rounded end ??
>
>thanks
>jon
>
>
> Dr. Jonathan M. Grimes,
> NDM Senior Reseach Fellow
> University Research Lecturer
> Division of Structural Biology
> Wellcome Trust Centre for Human Genetics
> University of Oxford
> Roosevelt Drive,
> Oxford OX3 7BN, UK
>
> Email: jonat...@strubi.ox.ac.uk, Web: www.strubi.ox.ac.uk
> Tel: (+44) - 1865 - 287561, FAX: (+44) - 1865 - 287547
>
>
>
> On 14 Dec 2012, at 09:13, Tsjerk Wassenaar wrote:
>
> Hey :)
>
> Can't resist the challenge...
> For any given ensemble, you can draw a trace through the C-alphas using
> the following lines, illustrated here for the NMR ensemble '1NMR':
>
> # Get the structure
> fetch 1nmr
>
> # Get the number of states
> n = cmd.count_states('1nmr')
>
> # Collect the C-alpha coordinates
> # This calls get_model for every state and extracts the coordinates for
> every model-state
> # The resulting list is transposed, such that each list entry contains the
> coordinates for one C-alpha over all states
> x=zip(*[cmd.get_model('1nmr and n. ca',state=i+1).get_coord_list() for i
> in range(n)] )
>
> # Now draw the traces by building a CGO model
> cmd.load_cgo([i for j in x for u,v,f in zip(j,j[1:],range(r)) for i in
> [9.0]+u+v+[0.1,1,1-(1.*f)/r,1-(1.*f)/r,1,1-(1.+f)/r,1-(1.+f)/r]],"trace")
>
> The 9.0 is the CGO code for a cylinder (pymol.cgo.CYLINDER). The 0.1 is
> the radius, and the following six values are the start and end RGB values,
> which are related to the state number, such that they end up from white to
> red. For more complex colors it would be nice to have a rgb() function that
> would return a color according to some scheme, given a fraction, which
> would make that last command
>
> cmd.load_cgo([i for j in x for u,v,f in zip(j,j[1:],range(r)) for i in
> [9.0]+u+v+[0.1]+rgb((1.*f)/r,scheme=...)+rgb((1.+f)/r,scheme=...)],"trace")
>
> Hope it helps,
>
> Tsjerk
>
>
> On Thu, Dec 13, 2012 at 10:54 PM, Robert Campbell <
> robert.campb...@queensu.ca> wrote:
>
>> Hi,
>>
>> (replying to my own message)
>>
>> On Thu, 2012-12-13 15:52  EST,  Robert Campbell
>>  wrote:
>>
>> > Hi Jon,
>> >
>> > On Thu, 2012-12-13 16:09  EST,  Jonathan Grimes <
>> jonat...@strubi.ox.ac.uk>
>> > wrote:
>> >
>> > >   Hi All,
>> > >
>> > >I have 2 different states of the same molecule..different
>> > > conformations generated from MD, so the same number of Calpha atoms,
>> > > with a direct 1:1 mapping between Calphas with the same residue
>> > > numbering.
>> > >
>> > >I would like to draw a "bond" between equivalent C-alpha atoms,
>> and I
>> 

Re: [PyMOL] About ray trace and spheres

2012-12-31 Thread Tsjerk Wassenaar
Hi Anasuya,

Happy New Year!

sphere_mode only controls the appearance. You probably want to try
sphere_scale.

Enjoy,

Tsjerk


On Mon, Dec 31, 2012 at 12:14 PM, Anasuya Dighe
wrote:

> Hi,
>
> I am representing C-alpha atoms of binding site as spheres.
> I am using the set sphere_mode command to adjust the radius of the
> spheres. I
> use the sphere_mode as 4.
> However, when I do a ray tracing, no matter how small the spheres I set,
> they
> appear very large once the ray tracing is carried out.
> This auto-enlargement after ray-tracing is not what I wish to obtain.
>
> I am looking forward to obtain small spheres after I do a ray tracing.
>
> Please help.
> - Anasuya
>
>
>
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
>
> --
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Biocomputing Group
Department of Biological Sciences
2500 University Drive NW
Calgary, AB T2N 1N4
Canada
--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Write vector graphics of session

2013-01-15 Thread Tsjerk Wassenaar
Hi,

I would be in favor of SVG format, because it is human
readable/editable/scriptable. The other formats are harder to deal with,
without using some external program, and SVG can be converted into either
of them anyway. In addition, SVG is suitable for use on webpages.

Cheers,

Tsjerk


On Tue, Jan 15, 2013 at 1:38 PM, Marius Retegan
wrote:

> Hello,
>
> +1 for svg. It would be easier to add/remove stuff from them with a
> vector drawing program like Inkscape.
> Also .svg is also an open format. Not sure about .eps.
>
> All the best,
> Marius
>
> On Tue, Jan 15, 2013 at 1:32 PM, Martin Hediger  wrote:
> > I'm no expert but I guess my favorite would be EPS. Converting to PDF,
> > if required, is easy on the Mac.
> >
> > Best regards
> > Martin
> >
> >
> >
> > On 14.01.13 23:53, Jason Vertrees wrote:
> >> Martin,
> >>
> >> That would be a nice feature. Which format would you and the others
> >> prefer: SVG, PDF, or EPS?
> >>
> >> Cheers,
> >>
> >> -- Jason
> >>
> >> On Sat, Jan 12, 2013 at 6:31 AM, Martin Hediger 
> wrote:
> >>> Hi PyMOL users
> >>> Can PyMOL write a vector based picture of a session? Does not require
> to
> >>> be very "fancy", but vector based would be cool. Something like in the
> >>> old days with molscript.
> >>>
> >>> Best regards
> >>> Martin
> >>>
> >>>
> --
> >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> >>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> >>> MVPs and experts. SALE $99.99 this month only -- learn more at:
> >>> http://p.sf.net/sfu/learnmore_122912
> >>> ___
> >>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> >>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> >>> Archives:
> http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> >>
> >>
> >
> >
> >
> --
> > Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> > and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> > 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> > SALE $99.99 this month only - learn more at:
> > http://p.sf.net/sfu/learnmore_122512
> > ___
> > PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> > Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>
>
> --
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Biocomputing Group
Department of Biological Sciences
2500 University Drive NW
Calgary, AB T2N 1N4
Canada
--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] stereo image

2013-02-21 Thread Tsjerk Wassenaar
Hi Yamei,

There's nothing wrong with your approach. If you like the results, and
they illustrate the point your trying to make, it's good.

Cheers,

Tsjerk

On Thu, Feb 21, 2013 at 9:22 AM, Yamei Yu  wrote:
> Hi All,
>
> I want to generate a stereo image for a structure. I use
> pymol-diaplay-Stereo mode cross-eye stereo and then I ray the figure and
> save the figure.
>
> But previously I notice the others manually rotate the model and manually
> generate the figure. Is there something wrong for the first method?
>
> Thanks !
>
> yamei
>
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Biocomputing Group
Department of Biological Sciences
2500 University Drive NW
Calgary, AB T2N 1N4
Canada

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] About draw_links.py by Dr. Robert Campbell

2013-02-21 Thread Tsjerk Wassenaar
Hi,

If you want to draw all bonds for all pairs between two selections,
you can just use bond:

bond sele and n. ca, sele and n. ca


Hope it helps,

Tsjerk

On Thu, Feb 21, 2013 at 9:19 PM, Robert Campbell
 wrote:
> Hi Anasuya,
>
> On Thu, 21 Feb 2013 17:10:40 +0530
> Anasuya Dighe  wrote:
>
>>
>> Hi,
>>
>> I have been trying to use the script draw_links.py at
>> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/ to view links
>> between each pair of c-alpha atoms present in an atom selection.
>> Once I load a PDB (1q16.pdb) and make an atom selection, lets say :
>> PyMOL>select pk1, name CA in resi 5+10+15+12+16 and chain C , on the
>> PyMOL>command-line in pymol, I
>> do : PyMOL>run draw_links.py
>>
>> I wanted to visualise links between all pairs of calpha atoms present in
>> the atom selection, pk1.
>> However I am unable to do that using draw_links.py
>> I am doing: PyMOL> draw_links pk1
>>
>> How can I do this using draw_links.py?
>> Where am I going wrong?
>
> Perhaps the instructions are not clear enough, but the script is not
> designed to automatically draw links between all pairs of C-alphas in a
> selection. It expects two different selections and it will draw links
> between the first residue of each selection and then the second and so on.
> It doesn't therefore make sense to give it the same selection for both
> because, in your example, it draws a zero-length link between residue 5 and
> residue 5, and another between residue 10 and residue 10 and so on.
>
> You will have to run the script multiple times to get the links you want:
>
> draw_links name CA & resi 5 and chain C, name CA  resi 10 and chain C
> draw_links name CA & resi 5 and chain C, name CA  resi 15 and chain C
> draw_links name CA & resi 5 and chain C, name CA  resi 12 and chain C
>
> Sorry that it doesn't quite do what you were expecting!  I designed it for
> the situation where I have two structures that exhibit a conformational
> change and I wanted to show how the C-alphas were moving so then it made
> sense to have the two selections be the same atoms, but in different
> molecules.
>
> Cheers,
> Rob
> --
> Robert L. Campbell, Ph.D.
> Senior Research Associate/Adjunct Assistant Professor
> Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
> Queen's University,
> Kingston, ON K7L 3N6  Canada
> Tel: 613-533-6821
> http://pldserver1.biochem.queensu.ca/~rlc
>
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Biocomputing Group
Department of Biological Sciences
2500 University Drive NW
Calgary, AB T2N 1N4
Canada

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Pymol Scripts for Coarse grained for non-protein molecules

2013-03-01 Thread Tsjerk Wassenaar
Hi Stephane,

You can convert a Gromacs run input file (.tpr) to a pdb file with
CONECT records using the Gromacs tool 'editconf' with the '-conect'
flag. The CONECT records will be set according to the bonds in the
topology. Pymol will read the CONECT records and set the bonds. If you
have a trajectory or a snapshot you want to visualize, you can load
the convert run input file first, and load the other structure(s) in
that object:

load tpr.pdb, cg
load traj.pdb, cg

Hope it helps,

Tsjerk


On Thu, Feb 28, 2013 at 1:18 PM, ABEL Stephane 175950
 wrote:
> Hi all,
>
> I am looking for pymol scripts for showing coarse grained representation of 
> non-protein molecules. I am currently using the sphere representation for 
> each bead, but the bond between two beads are not shown, so it does not nice 
> figures.
>
> Can you help me or give some advices
>
> Thanks you in advance
>
> Stephane
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Biocomputing Group
Department of Biological Sciences
2500 University Drive NW
Calgary, AB T2N 1N4
Canada

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Showing secondary structure of coarse grained protein

2013-03-04 Thread Tsjerk Wassenaar
Hi Stephane,

You don't have phi/psi angles, so determining secondary structure is a
bit problematic. What you can do is draw a trace through the backbone
beads and set the secondary structure representation explicitly.
You'll have to make sure to exclude connections between chains.

set cartoon_trace_atoms
show cartoon, CG_protein and n. bb
cartoon helix
cartoon loop, i. 1-10
# and so on...


Hope it helps,

Tsjerk


On Mon, Mar 4, 2013 at 4:03 PM, ABEL Stephane 175950
 wrote:
> Hello everybody,
>
> I have done several MD simulations with the Martini force field of systems 
> that contain a small protein and surfactant with GROMACS. It is possible to 
> show with pymol the secondary structure of the protein with a cartoon 
> representation and the detergent molecules with beads at the same time. I 
> know from you that I can use for the detergent molecules, the "connects" but 
> for protein i don't know how to do (with the alter command?).
>
> Can you help me?
>
> Thanks you in advance
>
> Stephane
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Biocomputing Group
Department of Biological Sciences
2500 University Drive NW
Calgary, AB T2N 1N4
Canada

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] How to ray trace clipped image without clipping spheres.

2013-03-11 Thread Tsjerk Wassenaar
# Hey :)

# Here is a work around...

# First import the numpy module
import numpy

# Then store the viewing matrix as 6 by 3 numpy array.
M=numpy.array(cmd.get_view()).reshape(6,3)

# Now place a pseudoatom at the position of the camera
# Turn off autozoom to keep the view
set auto_zoom, 0
scale=1.0
cmd.pseudoatom("dummy",pos=list(M[4,:]-scale*numpy.dot(M[:3,:3],M[3,:])))

# The dummy can now be used to hide all spheres within a cutoff distance. E.g.
hide spheres, all within 150 of dummy

# You may need to play with the distance to get the right effect.
# It is possible to use the distances of the original clipping planes,
# by extracting those from the viewing matrix.
# The 'scale' parameter can be used to adjust the effect.
# If scale > 1, the dummy is placed behind the camera, which may be
# required for a proper planar cut.
# On the other hand, you can set it to < 1, to put the dummy closer to
# the scene and cut out a spherical region.

# Note that you can change the view after this operation and have a
nice sideview
# of a clipped system, or use it to clip a system multiple times from
different sides.

# Enjoy!

# Cheers,

# Tsjerk

--
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Splitting a PDB file into its constituent chains, and making multiple (smaller) PDB files

2013-04-04 Thread Tsjerk Wassenaar
Hi Anasuya,

You can make the selections in PyMOL and save each chain separately. But if
you have to do batch processing, you're probably better off using sed:

sed -n "/^.\{21\}P/p" 1a55.pdb > 1a55_P.pdb
sed -n "/^.\{21\}Q/p" 1a55.pdb > 1a55_Q.pdb
sed -n "/^.\{21\}R/p" 1a55.pdb > 1a55_R.pdb

To automate completely, you can do (in bash):

pdb=1a55.pdb
for chain in $(grep "^ATOM" $pdb | cut -b 22 | sort -u); do sed -n
"/^.\{21\}$chain/p" $pdb > ${pdb%.pdb}_$chain.pdb; done

You can make that a small script, like 'chains.sh', containing:


#!/bin/bash
pdb=$1
for chain in $(grep "^ATOM" $pdb | cut -b 22 | sort -u)
do
sed -n "/^.\{21\}$chain/p" $pdb > ${pdb%.pdb}_$chain.pdb
done


That script you can run giving a pdb file as argument.

Hope it helps,

Tsjerk




On Thu, Apr 4, 2013 at 12:19 PM, Anasuya Dighe wrote:

> Hello,
>
> I wanted to know if its possible in PyMOL to split a PDB file with multiple
> chains,into its component chains and make smaller PDB files corresponding
> to
> each chain.
>
> For eg: I have a pdb file, 1a55.pdb, having chains P,Q and R. How do I make
> split it to separate components like 1a55_P.pdb, 1a55_Q.pdb, 1a55_R.pdb
>
> Also, in case I have a large number of multiple chain PDB files, how could
> I go
> about splitting each of them?
>
> Please help.
>
>  - Anasuya Dighe
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
>
> --
> Minimize network downtime and maximize team effectiveness.
> Reduce network management and security costs.Learn how to hire
> the most talented Cisco Certified professionals. Visit the
> Employer Resources Portal
> http://www.cisco.com/web/learning/employer_resources/index.html
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.
--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Reset Default Carbon Color

2013-04-10 Thread Tsjerk Wassenaar
Hi Wilson,

I don't know how to reset the color scheme, but maybe something along the
following lines can help out:


# set the colors (change to your liking):
colors = ("green","cyan","magenta","yellow")

# create a color iterator:
python
def colit():
i = 0
while True:
yield colors[i%len(colors)]
i += 1
python end

# initialize (or reset) colors
c = colit()

# load files and color them

load file1.pdb
cmd.color(c.next(), "elem c")

load file2.pdb
cmd.color(c.next(), "elem c")

# ...etc


Hope it helps,

Tsjerk



On Wed, Apr 10, 2013 at 9:03 AM, Wilson Omesiete wrote:

> I noticed that the default carbon color for loaded objects is set to cycle
> from green to pink and then repeat to differentiate models. I have a lot of
> models being loading and deleted within one session, and it would be very
> useful to be able to reset that cycle, So that the first model after a
> reset will have green carbons, the second will have cyan carbons, and so
> on. This way my coloring patterns would be consistent.
>
> The reset function does not affect the cba* cycle, and I know that I could
> manually call the cba* variants after every file is loaded to force this
> functionality, but I would rather avoid that if possible.
>
>
> --
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.
--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] CGO fixed in space

2013-04-15 Thread Tsjerk Wassenaar
Hi Tim,

No, that is not possible. And a workaround isn't simple. You can wrap the
CGO object and place it each time you need it, using the information stored
in the viewing matrix.

Cheers,

Tsjerk


On Tue, Apr 16, 2013 at 1:43 AM, Someone Else  wrote:

> Hi,
>
> is it possible to define a CGO object (e.g. a text) that wouldn't move
> when a user rotates the scene? For example, a graphics title in the top
> left corner
>
> Tim
>
>
>
>
> --
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.
--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] storing 3d vectors in python

2013-05-07 Thread Tsjerk Wassenaar
Hi Bharat,

Not exactly a Pymol question, is it? But in case you're using a list of
simple vectors as tuples or lists you can easily add them the Python way,
provided that the list is not too long (or it'll be slow):

vecs = [(a,b,c),(d,e,f),...]
v = [sum(i) for i in zip(vecs)]

Alternatively, you can use numpy, or use (rosetta.numeric):

import numpy
arr = numpy.array(vecs)
v = arr.sum(axis=0)

Hope it helps,

Tsjerk




On Mon, May 6, 2013 at 9:01 AM, bharat gupta wrote:

> Dear Members,
>
>
> I want to know that how can I store a 3d vector in to list , so that I can
> add them and final create a  single vector out of the list. For eg.
>
> vec1 = ( 3.2810001-0.021500318 -0.5725001
> ) + ( 3.072 0.03114 -0.9344999) +
> (3.0035000  0.49349974  -1.146999)
>
> vec2 = (  -3.496 -0.73750114
> 0.01649970 ) + (-3.439  0.17499972
>  0.4919997)  +  (-1.611  -1.1715002
> 2.753500)
>
> Finally I want to add those single vectors for each vec1 and vec2 to get
> two final vectors. These vectors I got from pyrosetta. When I try to append
> them to list I get an output like this :-
>
> [ 0x0AE068A0>,  object at 0x
> 0AE068F0>,  at 0x0AE06850>]
>
> --
> Bharat
>
>
>
>
> --
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] new to list -- simple questions

2013-05-26 Thread Tsjerk Wassenaar
Hi Bob,

I notice that this question has not yet been answered, unless you have
received private answers. To start with the second question, this list is
followed by those who are most involved in the code, and, AFAIK, there is
no specific developers list (I do care to know if there is :P). Also for
general how-to questions, this is the place to be.

As for the first question, I would say that it would be valuable to have a
way to communicate not only a static picture with caption, but also an
annotated, interactive view.

Finally, I don't think there's a repository of session files. Are there
specific things that you're missing in the set you have? I can probably
provide some examples with various classes of CGO objects.

Hope it helps,

Tsjerk



On Fri, May 24, 2013 at 9:59 PM, Robert Hanson  wrote:

> Hello, PyMOL users!
>
> I'm new to this list. Some may recognize me as the current principal
> developer of Jmol. Until recently I hadn't explored PyMOL much, mostly
> because I'm not myself a biochemist. For about three months now, though,
> Jaime Prilusky (Weizmann Institute) and I have been working on a PSE file
> reader for Jmol, and I think we're just about ready to roll that out, at
> least in a preliminary version.
>
> A few questions:
>
> Q: Does the availability of a way to manipulate PyMOL models on the web
> using Java or just HTML5 interest this crowd? Or are people more focused
> specifically on journal image production or stand-alone PyMOL application
> use?
>
> Q: Are there people on this list who can answer fundamental PyMOL
> programming issues, or is that another list? I'm pretty much a autodidact,
> but there are some nuances that I don't understand. I don't want to waste
> this list's bytes if questions like "Is the second array in a scene color
> definition list always just a list of 1s?" are inappropriate.
>
> Q: I also have lots of questions relating to how you go about doing things
> in PyMOL. (Getting a list of all defined scenes, for example.) OK to ask
> those here?
>
> Q: Now that we have a pretty good handle on how PyMOL is organized and
> most of the basic data structures, and with all the *basic* modeling
> options reproducible in Jmol, we need more examples. More interesting CGOs
> than "Hello, World," examples of various specific objects such as Surface
> object, that sort of thing. I think I'm just about done with our current
> sample set of about 100 PSE files. Anyone interested in contributing PSE
> files to the Jmol project? Is there a repository somewhere of those?
>
>
> Thanks in advance,
>
> Bob Hanson
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Chemistry Department
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
>
>
> --
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.
--
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] arranging atom records in pdb file by resid

2013-05-30 Thread Tsjerk Wassenaar
Hi Thomas,

Probably something like this should do something close to what you need:

sed -n '/^\(ATOM\|HETATM\)/s/^.\{16\}\(.\{10\}\)/\1 \0/p' file.pdb | sort
-n -k 3 | cut -b 11-

Hope it helps,

Tsjerk



On Thu, May 30, 2013 at 10:21 AM, Thomas Evangelidis wrote:

> Dear PyMOL users/developers,
>
> Is there any way to rearrange the atom records in a .pdb file according to
> their residue ID? I have run Vina with flexible sidechains and then
> concatenated the rigid receptor part with the sidechain conformations for
> each pose. That resulted to .pdb files where the backbone atoms (apart from
> Ca) occur in the correct order but the flexible sidechain atoms are at the
> end of the file. That leads to some problems in visualization and analysis
> of the protein-ligand complexes that I'd like to overcome. If anyone know
> how to fix that problem either with PyMOL or any other program please let
> me know.
>
> thanks,
> Thomas
>
>
> --
>
> ==
>
> Thomas Evangelidis
>
> PhD student
> University of Athens
> Faculty of Pharmacy
> Department of Pharmaceutical Chemistry
> Panepistimioupoli-Zografou
> 157 71 Athens
> GREECE
>
> email: tev...@pharm.uoa.gr
>
>   teva...@gmail.com
>
>
> website: https://sites.google.com/site/thomasevangelidishomepage/
>
>
>
>
> --
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.
--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] colouring states of a md trajectory

2013-06-02 Thread Tsjerk Wassenaar
Hi Sid,

Have a look at this:

http://pymolwiki.org/index.php/Spectrum_states

Hope it helps,

Tsjerk


On Sun, Jun 2, 2013 at 8:06 PM, Sridharan, Sudharsan <
sridhar...@medimmune.com> wrote:

>  Hi all,
>
>
>
> Sorry this may be a naive question and probably has a simple answer but I
> haven’t been able to figure it out!
>
>
>
> I’d like to colour all the states of a md trajectory shown as ribbons with
> state 1 coloured the darkest, say black, gradually going to the lightest
> shade for the last state. How do I do this please. If I have two chains,
> how can I colour similarly but using two different colours for the two
> chains. (I was able to colour all the states using rainbow colours)
>
>
>
> Many thanks.
>
>
>
> Kind regards,
>
> Sid.
>
>
>
>
>
> Sudharsan Sridharan, Ph.D.
>
> Scientist I
>
> Protein Sciences, Department of Antibody Discovery and Protein Engineering
>
> MedImmune* Ltd., Aaron Klug Building, Granta Park, Cambridge, CB21 6GH, UK.
>
> Direct telephone: + 44(0)1223  898195 <> Facsimile: + 44(0)1223 471472 <> 
> Email:
> sridhar...@medimmune.com <> Web: www.medimmune.com
>
> * *
>
> MedImmune *
> Milstein Building, Granta Park, Cambridge, CB21 6GH, UK
> (formerly Cambridge Antibody Technology Limited) Registered Office:
> Milstein Building, Granta Park, Cambridge, CB21 6GH, UK Registered in
> England and Wales number 2451177. Confidentiality Note: This information
> and any attachments is confidential and only for use by the individual or
> entity to whom it has been sent. Any unauthorised dissemination,
> distribution or copying of this message is strictly prohibited. If you are
> not the intended recipient please inform the sender immediately by reply
> e-mail and delete this message from your system. Thank you for your
> co-operation. We may monitor or record emails to or from MedImmune. E-mails
> may contain viruses or other harmful software that may damage your system.
> Whilst we have tried to eliminate such viruses and other harmful software
> we cannot accept liability for any damage caused to your system by any that
> remain. It is your responsibility to protect your system and you are
> advised to carry out your own checks on e-mails from us.
>
>
>  To the extent this electronic communication or any of its attachments
> contain information that is not in the public domain, such information is
> considered by MedImmune to be confidential and proprietary. This
> communication is expected to be read and/or used only by the individual(s)
> for whom it is intended. If you have received this electronic communication
> in error, please reply to the sender advising of the error in transmission
> and delete the original message and any accompanying documents from your
> system immediately, without copying, reviewing or otherwise using them for
> any purpose. Thank you for your cooperation.
>
>
> --
> Get 100% visibility into Java/.NET code with AppDynamics Lite
> It's a free troubleshooting tool designed for production
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap2
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Tsjerk A. Wassenaar, Ph.D.
--
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

  1   2   3   4   5   6   >