Compatibility Problem Between Pymol And Python App'S Version
1
2
Entering edit mode
13.5 years ago
Thaman ★ 3.3k

Currently I'm working with PyMol application and practicing to write some Python scripts which will run in Pymol terminal.

What I am trying to do is generate pairwise combination of structure for example

str1=['1bcd','3acz','cdsa', 'se1a']

str2=['dacd','qacz','acda', 'e2ac']

Generate pairwise comparision of str1, str2 and between str1 and str2. I loaded all structures in Pymol then I tried to run Python script in Pymol terminal which will calculate all pairwise combination and return RMS value.

But, problem I am facing is Pymol doesn't recognize intertools.combination module which I have used in python script.

Is there any Python latest plugin that I can download for Pymol to make it compatible? I am using python 2.7 but according to Pymol terminal I can see sys.version =2.4.2

How can I solve my problem?

Thank you

pymol python • 4.1k views
ADD COMMENT
2
Entering edit mode
13.5 years ago

You have two options here.

  • Write your own combination routine.

For combining the elements of str1, this would look something like:

combinations = []
for i in range(0, len(str1)):
    for j in range(i+1, len(str1)):
        combinations.append([str1[i], str1[j])
  • Install PyMOL with a newer python version

Compile PyMOL yourself with a newer python version (cf. this post) or get a already built version, eg. here (HINT: you will most likely want pymol-1.3r1.win32-py2.7.exe as this is the by far easiest solution). Maybe there is a way to tell your already installed PyMOL to use the newer python version installed on your system, but I do not know if and how this is possible.

ADD COMMENT

Login before adding your answer.

Traffic: 1468 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6