|
From: Istvan K. <iko...@gm...> - 2024-07-01 00:18:53
|
Hi,
I want to do the following. I have a trajectory file with numerous frames
that I load to Pymol as a multi-state object called traj and I have a
single state object with a ligand molecule called lig. I have a simple
align command (with a particular selection of some residues) that allows me
to (approximately) dock the ligand to each state in traj. I would like to
create a new traj object where in every state the ligand is docked.
I was hoping that the following code would do the job.
python
align lig, traj, target_state=1 # omitted align selection details
create docked_traj, lig or traj, source_state=1, target_state=1
for i in range (2,num_traj_states+1):
align lig, traj, target_state=i
create docked_traj, lig or traj, source_state=i, target_state=i
python end
However, the docked_traj coordinates are garbled. I figured this could be
attributed to merging a multi-state object and a single state object and
"source_state" might be ill-defined in this case. So, I tried using
split_states to avoid this ambiguity. The modified code is.
python
split_states traj, 1, 1, tmp
align lig, tmp0001 # omitted align selection details
create docked_traj, lig or tmp0001, target_state=1
for i in range (2,num_traj_states+1):
split_states traj, i, i, tmp
align lig, tmp0001
create docked_traj, lig or tmp0001, target_state=i
python end
Unfortunately, the end result is exactly the same. I attached two
screenshots, one with the correct coordinates and one with the garbled
ones. (The overlap between green and blue atoms is not a problem in this
context.)
Can anyone suggest a solution?
Many thanks,
Istvan
[image: image.png]
[image: image.png]
|