prody / ProDy

A Python Package for Protein Dynamics Analysis
http://prody.csb.pitt.edu
Other
435 stars 158 forks source link

Ensemble superpose #1912

Open Yago52 opened 4 months ago

Yago52 commented 4 months ago

Hello again,

I think the ref argument in superpose is selecting the atom and not the frame/conformation to superpose the ensemble. So a code like this:

#dados anteriores
data = '09072024'
spike_close = parsePDB('6vxx', chain = 'A', subset = 'ca')
chdir('/home/ysilva/ownCloud/mestrado/estruturas para projeto/scripts/data_cov3d/ensemble_close_'+ data)
#chdir('/home/ysilva/ownCloud/mestrado/estruturas para projeto/scripts/data_cov3d/ensemble_close_05122023')
ensemble_all_close = loadEnsemble('ensemble_all_close.ens.npz')
pca_all_close = loadModel('close.pca.npz')
#anm_all_close = loadModel('close.anm.npz')
chdir('/home/ysilva/ownCloud/mestrado/estruturas para projeto/scripts/data_cov3d')
#chdir('/home/ysilva/ownCloud/mestrado/estruturas para projeto/scripts/data_cov3d')
#dados estrutura de referência

chdir('/home/ysilva/estruturas_anton/teste')
#chdir('C:/Users/yagos/estruturas anton/teste')
ref = parsePDB('chain_A_aligned.pdb')

#trajetoria 6vxx
#chain A
chain_A_ensemble = parseDCD('chain_A_aligned.dcd')
chain_A_ensemble.setCoords(ref)
chain_A_ensemble.setAtoms(ref)

#chain B
chain_B_ensemble = parseDCD('chain_B_aligned.dcd')
chain_B_ensemble.setCoords(ref)
chain_B_ensemble.setAtoms(ref)

#chain C
chain_C_ensemble = parseDCD('chain_C_aligned.dcd')
chain_C_ensemble.setCoords(ref)
chain_C_ensemble.setAtoms(ref)

anton_close_all = chain_A_ensemble + chain_B_ensemble + chain_C_ensemble

#TRajetoria 6vyb
#chain A
chain_A_ensemble_open = parseDCD('sarscov2-11021571_chainA_aligned.dcd')
chain_A_ensemble_open.setCoords(ref)
chain_A_ensemble_open.setAtoms(ref)

#chain B
chain_B_ensemble_open = parseDCD('sarscov2-11021571_chainB_aligned.dcd')
chain_B_ensemble_open.setCoords(ref)
chain_B_ensemble_open.setAtoms(ref)

#chain C
chain_C_ensemble_open = parseDCD('sarscov2-11021571_chainC_aligned.dcd')
chain_C_ensemble_open.setCoords(ref)
chain_C_ensemble_open.setAtoms(ref)

anton_open_all = chain_A_ensemble_open + chain_B_ensemble_open + chain_C_ensemble_open

anton_map_open = combineEnsembles(ensemble_all_close, anton_open_all, iterpose=False)
anton_map_open.superpose(ref=0)
anton_map_close = combineEnsembles(ensemble_all_close, anton_close_all, iterpose=False)
anton_map_close.superpose(ref=0)

The superpose uses the first atom and not the first frame. prody_version 2.4

Yago52 commented 4 months ago

the output:

PDB file is found in working directory (6vxx.pdb.gz).
@> 972 atoms and 1 coordinate set(s) were parsed in 0.04s.
@> 1121 atoms and 1 coordinate set(s) were parsed in 0.01s.
@> DCD file contains 8334 coordinate sets for 1121 atoms.
@> DCD file was parsed in 0.08 seconds.
@> 107.55 MB parsed at input rate 1334.83 MB/s.
@> 8334 coordinate sets parsed at input rate 103434 frame/s.
@> DCD file contains 8334 coordinate sets for 1121 atoms.
@> DCD file was parsed in 0.08 seconds.
@> 107.55 MB parsed at input rate 1327.86 MB/s.
@> 8334 coordinate sets parsed at input rate 102893 frame/s.
@> DCD file contains 8334 coordinate sets for 1121 atoms.
@> DCD file was parsed in 0.10 seconds.
@> 107.55 MB parsed at input rate 1126.91 MB/s.
@> 8334 coordinate sets parsed at input rate 87323 frame/s.
@> DCD file contains 8334 coordinate sets for 1121 atoms.
@> DCD file was parsed in 0.08 seconds.
@> 107.55 MB parsed at input rate 1340.52 MB/s.
@> 8334 coordinate sets parsed at input rate 103875 frame/s.
@> DCD file contains 8334 coordinate sets for 1121 atoms.
@> DCD file was parsed in 0.08 seconds.
@> 107.55 MB parsed at input rate 1331.16 MB/s.
@> 8334 coordinate sets parsed at input rate 103149 frame/s.
@> DCD file contains 8334 coordinate sets for 1121 atoms.
@> DCD file was parsed in 0.08 seconds.
@> 107.55 MB parsed at input rate 1298.62 MB/s.
@> 8334 coordinate sets parsed at input rate 100627 frame/s.
@> WARNING no one-letter mapping found for <Residue: NLM 1148 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1150 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1152 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1154 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1156 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1158 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1160 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1162 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1164 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1166 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1168 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1170 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1172 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1174 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1176 from Chain A from chain_A_aligned (1 atoms)> 
@> WARNING no one-letter mapping found for <Residue: NLM 1178 from Chain A from chain_A_aligned (1 atoms)