[PyMOL] Color menus off?

2009-01-28 Thread Gilles Truan

Hi all,
I just upgraded to the pymol 1.2b2. The install works perfectly etc.
I have a strange phenomenon though, all the colors in the menu on the 
right side of the graphics windows have disappeared as well as the 
colors in the sequence panel.

Any hint what it might be?
I have not change my configuration (environment variables):
System: Windows XP sp3
Path containing C:\Program Files\Delano Scientific\Pymol
PYMOLPATH defined to C:\Program Files\Delano Scientific\Pymol
PYTHONPATH defined to C:\Python25 (I use python for other things...).

Other than that, everything works perfectly (as far as I have tested)

Gilles


begin:vcard
fn:Gilles Truan
n:Truan;Gilles
org;quoted-printable:CNRS;Centre de G=C3=A9n=C3=A9tique Mol=C3=A9culaire
adr:;;1 Av. de la Terrasse;Gif-sur-Yvette Cedex;;91198;France
email;internet:gilles.tr...@cgm.cnrs-gif.fr
title;quoted-printable:Charg=C3=A9 de Recherches
tel;work:33-(0)1 69 82 36 65
tel;fax:33-(0)1 69 82 36 82
tel;home:33-(0)1 64 92 09 15
tel;cell:33-(0)6 28 06 67 84
url:http://www.cgm.cnrs-gif.fr/pompon/index.html
version:2.1
end:vcard



Re: [PyMOL] [Apbs-users] Strange behaviour with APBS

2008-09-23 Thread Gilles Truan

Thank you Tom!
Well, I can change my APBS script to remove all alternate conformations 
from b to d or e!!!

Thank you again for pulling out the information.
Gilles

Thomas Stout a écrit :

To follow up on one of Gilles least important questions: I was convinced that the PDB 
must contain structures for which there are more than two alternate conformations.  I 
downloaded all structures with resolutions between 0.5 and 1.0A and with a bit of regexp 
grepping, quickly found the following set of examples with at least three alternate 
conformers (I didn't find any with more than four, and the few that had four looked 
suspicious):

1BXO, 1BYI, 1CBN, 1CEX, 1DY5,
1EB6, 1EJG, 1EM0, 1EN8, 1EN9,
1ENE, 1ENN, 1ET1, 1EXR, 1F9Y,
1FN8, 1FY4, 1FY5, 1GCI, 1GDN,
1GWE, 1IX9, 1IXB, 1JFB, 1JXT,
1JXU, 1JXW, 1JXX, 1JXY, 1KTH,
1M40, 1MSO, 1MUW, 1MWQ, 1MXT,
1N1P, 1N4U, 1N4V, 1N4W, 1N55,
1N9B, 1OD3, 1PJX, 1PQ5, 1PQ8,
1R6J, 1S5M, 1S5N, 1SSX, 1TG0,
1US0, 1UZV, 1V0L, 1V6P, 1VB0,
1W0N, 1X6X, 1X6Z, 1XG0, 1XVO,
1YK4, 2AT0, 2BV4, 2BW4, 2CNQ,
2CWS, 2DDX, 2E4T, 2FWH, 2GEW,
2GG2, 2H5C, 2H5D, 2I16, 2I17,
2IXT, 2IZQ, 2NLS, 2NMZ, 2NRL,
2O7A, 2P74, 2PEV, 2PF8, 2PFH,
2PPP, 2PWA, 2PYA, 2QCP, 2QXW,
2RH2, 2V8B, 2VB1, 2Z6W, 3AL1,
3B3R, 3C78, 3CNJ, 3D1P, 8A3H

Cheers!
-Tom


-Original Message-
From: Gilles Truan [mailto:gilles.tr...@cgm.cnrs-gif.fr]
Sent: Mon 9/22/2008 6:14 AM
To: Nathan Baker
Cc: David Gohara; apbs-us...@lists.sourceforge.net list; 
pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] [Apbs-users]  Strange behaviour with APBS
 
Dear all,

Sorry for the late answer but I finally managed to find what the error is...
First thing, I work on a Windows XP environment (nobody's perfect!!), 
and some of the problems were related to that.
When I tried running everything from the command line (ie pdb2pqr and 
apbs) I did get the files 1CJC.pqr and the corresponding map pot.dx. I 
was able to read them with pymol and everything works. The problem 
arises only with the APBS pymol plugin. In the CJC file, residues with 
the alternate configuration A (and frankly I do not see the reason for 
that as the alt B is not present) existed and the handling of these 
alt conformations is different if pymol or pdb2pqr do the charge 
calculation. When the pdb file is transformed by pdb2pqr (command line 
version 1.3.0), the alternate sidechains conformations disappear. When 
Pymol transforms the file into a pqr one the alt field is still present 
and apbs does not understand the atom that looks something like 
NH1AARG. If I use the file generated by pdb2pqr (with the --apbs-input 
option) it works, apbs reads and does the calculation. The trick is the 
to remove alternate configurations (specially when no alt B exists!!!). 
I have done it on the CJC file and everything works perfectly from the 
apbs plugin and without the need to generate the pdb2pqr file.
I was not able to pinpoint the problem with the pymol output when 
running APBS. I noticed that the error messages differ a bit if I run 
Pymol from a link (ie without a shell window) or from the pymol command 
in a DOS shell. In the Pymol command window the error message is :


* APBS Tools: coarse grid: (301.633,318.546,307.146)
 APBS Tools: fine grid: (197.431,207.380,200.674)
 APBS Tools: center: (11.993,-11.506,14.548)
 APBS Tools: fine grid points (97,97,97)
ObjectMapLoadDXFile-Error: Unable to open file!
ObjectMapLoadDXFile: Does 'pymol-generated.dx' exist?
*
while in the cmd window the message is

*Reading PQR-format atom data from pymol-generated.pqr.
Valist_readPQR:  Error parsing atom 3526!
Error reading molecules!
ObjectMapLoadDXFile-Error: Unable to open file!
ObjectMapLoadDXFile: Does 'pymol-generated.dx' exist?*

which of course is much more informative because it points directly to 
the error in the pqr file that I had not been able to find because the 
pqr looked ok to me (Unfortunately I did not jump to the 3526th atom 
that has the alt A conformation!!).


Now the last problem: running the APBS plugin in WinXP generate path 
errors because of the spaces in the paths.


*Parsed input file.
Got paths for 1 molecules
Reading PQR-format atom data from **D:\Documents.
VASSERT: ASSERTION FAILURE!  filename vmem.c, line 241, ((num  0)  
(size  0))
This application has requested the Runtime to terminate it in an unusual 
way.

Please contact the application's support team for more information.
ObjectMapLoadDXFile-Error: Unable to open file!
ObjectMapLoadDXFile: Does 'pymol-generated.dx' exist?*

So the path is not complete (D:\Documents and Settings\Gilles\Mes 
Documents\blahblahblah\ is missing). Again, the error message in the 
pymol console was not complete:


* APBS Tools: coarse grid: (103.210,121.009,109.487)
 APBS Tools: fine grid: (80.712,91.182,84.404)
 APBS Tools: center: (17.315,-2.473,13.671)
 APBS Tools: fine grid points (97,97,97)
ObjectMapLoadDXFile-Error: Unable to open file!
*
Unfortunately I thought I had the same error while trying to run APBS

Re: [PyMOL] [Apbs-users] Strange behaviour with APBS

2008-09-23 Thread Gilles Truan

I think I found the problem with reading externally generated pqr files...

When pymol generates by itself the pqr file, it puts it in the working 
directory, hence the pymol-generated.in used for apbs and the pqr file 
are in the same directory. In the pymol-generated.in the file name of 
the pqr is given directly without any path given. On the contrary, when 
an externally generated pqr file is given in apbs plugin, the 
pymol-generated.in puts the entire path of the file, and in my case the 
path has spaces in its directory name...

The APBS manual is quite clear about that:

/|path|/

   The location of the molecular data file. This pathname should not
   include spaces.

And therefore APBS cannot read the pqr file!

Well, I think it really does not matter for now, as the different 
methods to work with the APBS plugin should work readilt. If for any 
reason some atoms are not assigned charges with pymo, I can still 
generated the pqr file, the apbs ini file and calculate the potential 
with apbs and read it with pymol


Gilles


Gilles Truan a écrit :

Dear all,
Sorry for the late answer but I finally managed to find what the error 
is...
First thing, I work on a Windows XP environment (nobody's perfect!!), 
and some of the problems were related to that.
When I tried running everything from the command line (ie pdb2pqr and 
apbs) I did get the files 1CJC.pqr and the corresponding map pot.dx. I 
was able to read them with pymol and everything works. The problem 
arises only with the APBS pymol plugin. In the CJC file, residues with 
the alternate configuration A (and frankly I do not see the reason for 
that as the alt B is not present) existed and the handling of 
these alt conformations is different if pymol or pdb2pqr do the charge 
calculation. When the pdb file is transformed by pdb2pqr (command line 
version 1.3.0), the alternate sidechains conformations disappear. When 
Pymol transforms the file into a pqr one the alt field is still 
present and apbs does not understand the atom that looks something 
like NH1AARG. If I use the file generated by pdb2pqr (with the 
--apbs-input option) it works, apbs reads and does the calculation. 
The trick is the to remove alternate configurations (specially when no 
alt B exists!!!). I have done it on the CJC file and everything works 
perfectly from the apbs plugin and without the need to generate the 
pdb2pqr file.
I was not able to pinpoint the problem with the pymol output when 
running APBS. I noticed that the error messages differ a bit if I run 
Pymol from a link (ie without a shell window) or from the pymol 
command in a DOS shell. In the Pymol command window the error message 
is :


* APBS Tools: coarse grid: (301.633,318.546,307.146)
APBS Tools: fine grid: (197.431,207.380,200.674)
APBS Tools: center: (11.993,-11.506,14.548)
APBS Tools: fine grid points (97,97,97)
ObjectMapLoadDXFile-Error: Unable to open file!
ObjectMapLoadDXFile: Does 'pymol-generated.dx' exist?
*
while in the cmd window the message is

*Reading PQR-format atom data from pymol-generated.pqr.
Valist_readPQR:  Error parsing atom 3526!
Error reading molecules!
ObjectMapLoadDXFile-Error: Unable to open file!
ObjectMapLoadDXFile: Does 'pymol-generated.dx' exist?*

which of course is much more informative because it points directly to 
the error in the pqr file that I had not been able to find because the 
pqr looked ok to me (Unfortunately I did not jump to the 3526th atom 
that has the alt A conformation!!).


Now the last problem: running the APBS plugin in WinXP generate path 
errors because of the spaces in the paths.


*Parsed input file.
Got paths for 1 molecules
Reading PQR-format atom data from **D:\Documents.
VASSERT: ASSERTION FAILURE!  filename vmem.c, line 241, ((num  0)  
(size  0))
This application has requested the Runtime to terminate it in an 
unusual way.

Please contact the application's support team for more information.
ObjectMapLoadDXFile-Error: Unable to open file!
ObjectMapLoadDXFile: Does 'pymol-generated.dx' exist?*

So the path is not complete (D:\Documents and Settings\Gilles\Mes 
Documents\blahblahblah\ is missing). Again, the error message in the 
pymol console was not complete:


* APBS Tools: coarse grid: (103.210,121.009,109.487)
APBS Tools: fine grid: (80.712,91.182,84.404)
APBS Tools: center: (17.315,-2.473,13.671)
APBS Tools: fine grid points (97,97,97)
ObjectMapLoadDXFile-Error: Unable to open file!
*
Unfortunately I thought I had the same error while trying to run APBS 
with the 1CJC file and using the pymol generated pqr (error with alt 
conformations) or using the pqr file generated independantly (PATH 
error with spaces in path names). It is all sorted out now. I can use 
the pdb2pqr web site to generate the pqr and apbs input files or 
directly pymol APBS plugin with the b factor and alternate 
conformation blanked out before use!!!


I finally looked at the apbs.py file to see where the pqr calculation 
was and added a few commands

Re: [PyMOL] [Apbs-users] Strange behaviour with APBS

2008-09-22 Thread Gilles Truan
 in common.


For now, however, the workaround is to make sure no B-factors 
exceed 100.


alter all, b=min(b,99.9)

should about do it.

Cheers,
Warren

-Original Message-
From: pymol-users-boun...@lists.sourceforge.net
[mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of 
Gilles Truan

Sent: Wednesday, September 17, 2008 1:09 AM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] Strange behaviour with APBS

I have noticed a strange behaviour of the APBS module. I used it a 
lot recently and it works perfectly for 95% of the structures I 
analyzed. I usually fetch the pdb code, then remove waters, 
heteroatoms and so on. I also noticed that in some cases, when the 
b factor is quite big (over
100) APBS cannot work the pdb file because it mixes up the b factor 
and the number which is just before (occupancy). But I managed with 
that, I usually erase the b factor to 0 before doing the APBS 
calculation and everything works fine then.
The other strange behavious is related to nothing I can pinpoint 
unfortunately. For some files (I always fetch them with the fetch 
command from Pymol), I can set the grid OK and when I launch APBS, 
I can see the file being processed (I see the select and hydrogens 
go on!) and then it stops with the following error message:


ObjectMapLoadDXFile-Error: Unable to open file!
ObjectMapLoadDXFile: Does 'pymol-generated.dx' exist?

All the paths for APBS are correctly setup, the temp files are 
setup as well.
If I then fetch a new file, APBS works, even for several files (one 
after
another) and if I come back to the file I wanted to do first, it 
gives me the same error message (BTW, the pdb file is 1CJC).


Any help would be greatly appreciated!!!


--
--- This SF.Net email is sponsored by the Moblin Your Move 
Developer's challenge Build the coolest Linux based applications 
with Moblin SDK  win great prizes Grand prize is a trip for two to 
an Open Source event anywhere in the world 
http://moblin-contest.org/redirect.php?banner_id=100url=/

___
apbs-users mailing list
apbs-us...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apbs-users



--
Associate Professor, Dept. of Biochemistry and Molecular Biophysics 
Center

for Computational Biology, Washington University in St. Louis
Web: http://cholla.wustl.edu/







gilles_truan.vcf


--
Associate Professor, Dept. of Biochemistry and Molecular Biophysics
Center for Computational Biology, Washington University in St. Louis
Web: http://cholla.wustl.edu/






begin:vcard
fn:Gilles Truan
n:Truan;Gilles
org;quoted-printable:CNRS;Centre de G=C3=A9n=C3=A9tique Mol=C3=A9culaire
adr:;;1 Av. de la Terrasse;Gif-sur-Yvette Cedex;;91198;France
email;internet:gilles.tr...@cgm.cnrs-gif.fr
title;quoted-printable:Charg=C3=A9 de Recherches
tel;work:33-(0)1 69 82 36 65
tel;fax:33-(0)1 69 82 36 82
tel;home:33-(0)1 64 92 09 15
tel;cell:33-(0)6 28 06 67 84
url:http://www.cgm.cnrs-gif.fr/pompon/index.html
version:2.1
end:vcard



Re: [PyMOL] [Apbs-users] Strange behaviour with APBS

2008-09-18 Thread Gilles Truan
I installed APBS 0.4.0 and my pymol version is the latest build for 
windows, ie 1.1 r0, the apbs plugin is the latest also I believe.


The b factor error is only visible when calculating the grid. I already 
use the b factor change (alter 1cjc, b=0), and the workaround works 
perfectly when the error message complains about strange numbers in the 
file (ValueError: invalid literal for float(): 1.00101.34). I also tried 
to do a pdb2pqr (via the web interface) before doing apbs, but I have 
never been able to read the pqr file through the APBS interface. In my 
hands, the pymol pdb to pqr conversion works quite well. 
My second problem is apparently not related to the b factor or the pqr 
file: it seems that for some pdb files, APBS cannot (or does not) see 
(or write) the pymol-generated.dx file...
If I fetch 1EHB pdb file, I can calculate an APBS map (removing water 
and hem molecules). If I fetch 1CJC pdb file, I cannot (again removing 
water and fad molecules)!! If I fetch again 1EHB and redo the 
calculation, everything goes fine. Here is the output of the commands...


PyMOLfetch 1ehb
PyMOLremove resn hoh+hem
APBS Tools: coarse grid: (61.146,53.431,62.444)
APBS Tools: fine grid: (55.968,51.430,56.732)
APBS Tools: center: (16.504,0.863,7.287)
APBS Tools: fine grid points (97,97,97)
DXStrToMap: Dimensions: 97 97 97
DXStrToMap: Origin  -11.480  -24.852  -21.079
DXStrToMap: Grid0.5830.5360.591
DXStrToMap: 912673 data points.
PyMOLdelete all
PyMOLfetch 1cjc
PyMOLremove resn hoh+fad
Maximum number of grid points exceeded.  Old grid dimensions were [129, 
161, 161]

Fine grid points rounded down from [91, 115, 115]
New grid dimensions are [65, 97, 97]
APBS Tools: coarse grid: (100.841,119.466,106.848)
APBS Tools: fine grid: (79.318,90.274,82.852)
APBS Tools: center: (17.545,-2.019,13.919)
APBS Tools: fine grid points (65,97,97)
ObjectMapLoadDXFile-Error: Unable to open file!
ObjectMapLoadDXFile: Does 'pymol-generated.dx' exist?
PyMOLdelete all
PyMOLfetch 1ehb
PyMOLremove resn hoh+hem
APBS Tools: coarse grid: (61.146,53.431,62.444)
APBS Tools: fine grid: (55.968,51.430,56.732)
APBS Tools: center: (16.504,0.863,7.287)
APBS Tools: fine grid points (97,97,97)
DXStrToMap: Dimensions: 97 97 97
DXStrToMap: Origin  -11.480  -24.852  -21.079
DXStrToMap: Grid0.5830.5360.591
DXStrToMap: 912673 data points.

DeLano Scientific a écrit :

Nathan,

Strictly speaking, the issue may be with PDB2PQR itself, not APBS.
Furthermore, we don't yet know whether a combined development version of all
three packages would still reproduce the problem.

As an aside, a good reason for PyMOL to see PQR files is for diagnostic
visualization:  to enable the user to inspect and modify or manipulate what
is being fed directly into APBS.
PyMOL can read  write PQR directly, though we may have issues reading
non-PDB-like PQR files.  I would generally agree that use of PDB2PQR to
convert PDBs to PQRs is the preferred route, since PyMOL doesn't do any
checking or optimization.

Anyway, based on reported symptoms alone, the problem appears to be that
some component in the PyMOL-APBS pipeline assumes that the input PDBs are
space-delimited rather than column-delimited.  This guess is based on the
observation that a B-factor of 100 or greater eliminates the space between
the occupany and the B factor in spec-compliant PDB files, and the
calculation fails.

As a starting point for troubleshooting, I just pulled current pdb2pqr
source from trunk and CANNOT reproduce the problem, so either this is
already a solved problem with current code, or something else is going on.  


Gilles, what versions of PyMOL and APBS are you using?

Cheers,
Warren
 
--

DeLano Scientific LLC
Subscriber Support Services
mailto:supp...@delsci.com


-Original Message-
From: Nathan Baker [mailto:nathanaba...@mac.com] 
Sent: Wednesday, September 17, 2008 6:28 PM

To: DeLano Scientific
Cc: gilles.tr...@cgm.cnrs-gif.fr; pymol-users@lists.sourceforge.net;
apbs-us...@lists.sourceforge.net
Subject: Re: [Apbs-users] [PyMOL] Strange behaviour with APBS

Hi Warren --

The PQR format (which doesn't really have a standard) is basically just
whitespace delimited.  I'm curious, though -- why would a PyMOL APBS
invocation ever see the PDB file?  Wouldn't a user first convert it to PQR
with PDB2PQR (ideally) or with PyMOL's built-in functionality?

Thanks,

Nathan

On Sep 17, 2008, at 2:21 PM, DeLano Scientific wrote:

  

Gilles,

The PyMOL and APBS programs have differing views as to whether PDB  
PQR files are column-based or space-delimited, respectively.  We must 
eventually sort this out, because it causes continued grief for our 
users in common.


For now, however, the workaround is to make sure no B-factors exceed 
100.


alter all, b=min(b,99.9)

should about do it.

Cheers,
Warren

-Original Message-
From: pymol-users-boun...@lists.sourceforge.net
[mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf Of Gilles 
Truan

Sent

[PyMOL] Strange behaviour with APBS

2008-09-17 Thread Gilles Truan
I have noticed a strange behaviour of the APBS module. I used it a lot 
recently and it works perfectly for 95% of the structures I analyzed. I 
usually fetch the pdb code, then remove waters, heteroatoms and so on. I 
also noticed that in some cases, when the b factor is quite big (over 
100) APBS cannot work the pdb file because it mixes up the b factor and 
the number which is just before (occupancy). But I managed with that, I 
usually erase the b factor to 0 before doing the APBS calculation and 
everything works fine then.
The other strange behavious is related to nothing I can pinpoint 
unfortunately. For some files (I always fetch them with the fetch 
command from Pymol), I can set the grid OK and when I launch APBS, I can 
see the file being processed (I see the select and hydrogens go on!) and 
then it stops with the following error message:


ObjectMapLoadDXFile-Error: Unable to open file!
ObjectMapLoadDXFile: Does 'pymol-generated.dx' exist?

All the paths for APBS are correctly setup, the temp files are setup as 
well.
If I then fetch a new file, APBS works, even for several files (one 
after another) and if I come back to the file I wanted to do first, it 
gives me the same error message (BTW, the pdb file is 1CJC).


Any help would be greatly appreciated!!!
begin:vcard
fn:Gilles Truan
n:Truan;Gilles
org;quoted-printable:CNRS;Centre de G=C3=A9n=C3=A9tique Mol=C3=A9culaire
adr:;;1 Av. de la Terrasse;Gif-sur-Yvette Cedex;;91198;France
email;internet:gilles.tr...@cgm.cnrs-gif.fr
title;quoted-printable:Charg=C3=A9 de Recherches
tel;work:33-(0)1 69 82 36 65
tel;fax:33-(0)1 69 82 36 82
tel;home:33-(0)1 64 92 09 15
tel;cell:33-(0)6 28 06 67 84
url:http://www.cgm.cnrs-gif.fr/pompon/index.html
version:2.1
end:vcard



[PyMOL] alter_state for y coordinates (2)?

2007-06-19 Thread Gilles Truan
Sorry for my first post,  I just relaized it was kind of hard to read  
with all the funny tags I am reposting for clarity!!!
I am trying to run a script to translate all pdb structures so that an  
atom of the protein gets the coordinate (0,0,0)

I have written a small script for that:

for i in pdb_names:
 stored.xyz = []
 cmd.iterate_state(1,(%s and name fe %(i)),stored.xyz.append([x,y,z]))
 a=stored.xyz[0][0]
 b=stored.xyz[0][1]
 c=stored.xyz[0][2]
 cmd.alter_state (1,(%s %(i)),x=x-a)
 cmd.alter_state (1,(%s %(i)),y=y-b)
 cmd.alter_state (1,(%s %(i)),z=z-c)

First, I have not been able to translate all the coordinates at once  
in the script with something like

cmd.alter_state (1,(%s %(i)),((x,y,z)=(x-a,y-b,z-c)))
I get this error message

 cmd.alter_state (1,(1AW3 and name fe),((x,y,z)=(x-a,y-b,z-c)))
   ^
 SyntaxError: invalid syntax

This was overcome by affecting each value separately. But then, when I  
check the coordinates of the fe atom that should be (0,0,0) all of  
them have zero values for x and z, but ot for y!!

All the y values are unaffected!!!

Is there something I am missing in the number format? When I check  
coordinates via the cmd.iterate_state, I can see that most of them are  
numbers with around 15 to 16 significative figures... where the pdb  
file has only three figures!! Is there something that is added by the  
iterate_state command, and might this could affect the calculation of  
the translation?


Thanks in advance for your answers  ;)







[PyMOL] TR : alter_state for y coordinates?

2007-06-19 Thread Gilles Truan
Yes, there definitely was an error in the quotes... And thank you for the
insight in the parenthesis, actually it works without, I was not able to
figure it out 
So the script 
for i in pdb_names:
 stored.xyz = []
 cmd.iterate_state(1,(%s and name fe %(i)),stored.xyz.append([x,y,z]))
 a=stored.xyz[0][0]
 b=stored.xyz[0][1]
 c=stored.xyz[0][2]
 cmd.alter_state (1,(%s %(i)),x,y,z=x-a,y-b,z-c)
 cmd.alter_state (1,(%s-h %(i)),x,y,z=x-a,y-b,z-c)
now works fine...
But I still have the strange thing with the y displacement. If I run the
script and I check the fe position (set as the reference one):
PyMOLiterate_state 1,1AW3 and name fe,(x,y,z)
(0.0, 9.5340003967285156, 0.0)
So the y position has not change while the x and z have shifted

Strange, no?




 Hi,
Firstly, I can see why there is a syntax error for the alter_state command:
cmd.alter_state (1,(1AW3 and name fe),((x,y,z)=(x-a,y-b,z-c)))
has the quotes in the wrong place. I guess it should be:
cmd.alter_state(1,(1AW3 and name fe),((x,y,z)=(x-a,y-b,z-c)))
I can make every atom move by saying:
cmd.alter_state(1, my_structure, x, y, z = x + 1, y + 1, z + 1)
So, the x,y,z=x-a,y-b,z-c would probably work, too. I hadn't
realised that variables in the current scope were accessible from the
alter_state scope, too.
gilleain

On 6/19/07, Gilles Truan gtr...@cg... wrote:
 Sorry for my first post, I just relaized it was kind of hard to read
 with all the funny tags I am reposting for clarity!!!
 I am trying to run a script to translate all pdb structures so that an
 atom of the protein gets the coordinate (0,0,0)
 I have written a small script for that:

 for i in pdb_names:
 stored.xyz = []
 cmd.iterate_state(1,(%s and name fe %(i)),stored.xyz.append([x,y,z]))
 a=stored.xyz[0][0]
 b=stored.xyz[0][1]
 c=stored.xyz[0][2]
 cmd.alter_state (1,(%s %(i)),x=x-a)
 cmd.alter_state (1,(%s %(i)),y=y-b)
 cmd.alter_state (1,(%s %(i)),z=z-c)

 First, I have not been able to translate all the coordinates at once
 in the script with something like
 cmd.alter_state (1,(%s %(i)),((x,y,z)=(x-a,y-b,z-c)))
 I get this error message

 cmd.alter_state (1,(1AW3 and name fe),((x,y,z)=(x-a,y-b,z-c)))
 ^
 SyntaxError: invalid syntax

 This was overcome by affecting each value separately. But then, when I
 check the coordinates of the fe atom that should be (0,0,0) all of
 them have zero values for x and z, but ot for y!!
 All the y values are unaffected!!!

 Is there something I am missing in the number format? When I check
 coordinates via the cmd.iterate_state, I can see that most of them are
 numbers with around 15 to 16 significative figures... where the pdb
 file has only three figures!! Is there something that is added by the
 iterate_state command, and might this could affect the calculation of
 the translation?

 Thanks in advance for your answers ;)




[PyMOL] TR : TR : alter_state for y coordinates?

2007-06-19 Thread Gilles Truan
YES!
Sometime you feel quite stupid
It was considered as the b factor... So everything works fine now... 
I'll be careful with already used named variables.

Thank you all for your help

-Message d'origine-
De : pymol-users-boun...@lists.sourceforge.net
[mailto:pymol-users-boun...@lists.sourceforge.net] De la part de
lie...@ultr.vub.ac.be
Envoyé : mardi 19 juin 2007 16:41
À : pymol-users@lists.sourceforge.net
Objet : Re: [PyMOL] TR : alter_state for y coordinates?


On Tuesday 19 June 2007 16:24, Gilles Truan wrote:
  cmd.alter_state (1,(%s %(i)),x,y,z=x-a,y-b,z-c)
 But I still have the strange thing with the y displacement. If I run 
 the script and I check the fe position (set as the reference one):

Maybe the problem is that the b is being interpreted as the
B factor of the atom, while a and c have no special meaning. Try x0,
y0 and z0 as the names for the variables for your displacement.

-- 
Lieven Buts
Laboratorium voor Ultrastructuur 
Vrije Universiteit Brussel

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of
your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users