0
$\begingroup$

I load a protein.pdb file into Pymol. This file has multiple frames (or states), and with different b-factor values at different frames at the PDB file b-factor columns.

enter image description here

After running the spectrum b command, the colouring is only based on the last state of the object.

So can I colour the frames differently using their corresponding b-factor values? In that case, I can see the colour changing throughout the frame playing.

In case someone wants to create a PDB of multiple frames, you can do like this:

MODEL        1
ATOM ......
ATOM ......
ENDMDL
MODEL        2
ATOM ......
ATOM ......
ENDMDL
$\endgroup$
2
  • $\begingroup$ Do you have a PDB ID one could use to reproduce this? $\endgroup$
    – canadianer
    Commented Aug 30, 2020 at 18:12
  • $\begingroup$ The PDB downloaded from the PDB website usually has only one frame. But my PDB comes from molecular dynamics, which has multiple frames. You can simply add a line of "MODEL 1" before the content, then add another line of "ENDMDL" at the end, and repeat this multiple times to create a PDB with multiple frames $\endgroup$
    – lanselibai
    Commented Aug 30, 2020 at 18:30

1 Answer 1

2
$\begingroup$

Well, didnt find a wat to do it in PyMol (even with spectrum b, blue_white_red, minimum= 0 , maximum=40, byres=1 on split_states test I get same colors on all the 4 models even if the b factors of the 4 models are different).

Ended up using on my test.pdb hosted here https://file.io/Y37LZ3El6UyR with Biopython mini-script to split test.pdb into 4 models pdbs with code:

import Bio
print('\n\n------------------------------------------------')
print('\n  Biopython Version : ',  Bio.__version__)
print('\n\n------------------------------------------------')

from Bio.PDB import PDBParser
from Bio.PDB.PDBIO import PDBIO


parser = PDBParser(QUIET=False, PERMISSIVE=True)
struct = parser.get_structure('test', 'test.pdb')
print('\nstructure : ', struct ,';  struct.id :',struct.id,   ';   len(structure) : ', len(struct))

for i in range(len(struct)):
    io=PDBIO()
    io.set_structure(struct[i])
    io.save(struct.id+str(i).zfill(4)+".pdb")

and assembled movie out of the four models uploaded as 4 independent objects in PyMol, colored by spectrum b, blue_white_red, minimum= 0 , maximum=40, byres=1, as described in Exercise 2: Scene based Movie in PyMOL Moviemaking Tutorial.

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .