Comments (5)
from imp-sampcon.
@ichem001 if it helps:
I seem to get ambiguity taken into account by the imp-sampcon script if in get_rmsds_matrix of rmsd_calculation.py I replace:
rmsd = calculator.pairwiseRMSDMatrix()
with
rmsd = []
for i in range(len(conforms)-1):
rmsd.extend(calculator.oneVsFollowing(i))
from imp-sampcon.
I have tried to reproduce your error but I am not able to reproduce either of the values.
- Produce the smallest possible example that shows the error. It does not make sense to debug on a six subunits complex.
- Could you run the
test_rmsd_calculation.py
test and make sure it passes. That test also makes sure you are using the latest version ofimp-sampcom
. - I cannot reproduce your numbers. I get a RMSD of 76 Å, not of 114 Å.
Let's take it from here to try to understand what the issue is.
from imp-sampcon.
Hi Ilan,
Thanks for looking into this!
- Sure, taking your usual structure as an example, building a dimer, and saving two RMF files with identical coordinates but with swapped chains (RMSD should be 0.0 when ambiguity works):
import IMP
import IMP.atom
import IMP.rmf
import IMP.pmi
import IMP.pmi.topology
import RMF
import sys
random_tr3d = IMP.algebra.get_random_local_transformation([0,0,0], 10, 10)
#create two swapped files
for file_i in (0, 1):
seqs = IMP.pmi.topology.Sequences(IMP.pmi.get_example_path('data/1WCM.fasta'))
mdl = IMP.Model()
s = IMP.pmi.topology.System(mdl)
st = s.create_state()
#add t
mol = st.create_molecule("Rpb4", seqs["1WCM:D"], chain_id="D")
atomic = mol.add_structure(IMP.pmi.get_example_path('data/1WCM_fitted.pdb'),
chain_id="D")
mol.add_representation(
atomic,
resolutions=[1])
clone = mol.create_clone("E")
hier = s.build()
if file_i == 0:
#for the first file, transform the copy 0
IMP.atom.transform(mol.get_hierarchy(), random_tr3d)
else:
#for the second file, transform the copy 1
IMP.atom.transform(clone.get_hierarchy(), random_tr3d)
orh = RMF.create_rmf_file('{0}.rmf3'.format(file_i))
IMP.rmf.add_hierarchy(orh, s.get_hierarchy())
IMP.rmf.save_frame(orh)
del orh
#calculate RMSDs
import pyRMSD
from pyRMSD.matrixHandler import MatrixHandler
import scipy
import scipy.spatial
from IMP.sampcon import rmsd_calculation
symmetry = "symm_groups.txt"
with open(symmetry, 'w') as f:
f.write('Rpb4.0 Rpb4.1')
###########################################
# reproducing what imp-exhaust is doing: #
###########################################
(ps, masses, radii,
conforms, symm_groups, models_name,
n_models) = rmsd_calculation.get_rmfs_coordinates_one_rmf(
"./",
'0.rmf3',
'1.rmf3',
None,
symmetry)
rmsd_calculation.get_rmsds_matrix( # noqa
conforms, 'cpu_omp', False, 2, symm_groups)
mHandler = MatrixHandler()
mHandler.loadMatrix("Distances_Matrix.data")
rmsd_matrix = mHandler.getMatrix()
distmat = rmsd_matrix.get_data()
distmat_full = scipy.spatial.distance.squareform(distmat)
print('RMSD from get_rmsds_matrix', distmat_full[0,1]) #this should be 0.0 Angstrom but is not !
###############################
# let's try differently then: #
###############################
calculator = pyRMSD.RMSDCalculator.RMSDCalculator(
'NOSUP_OMP_CALCULATOR',
fittingCoordsets=conforms,
calcSymmetryGroups=symm_groups,
fitSymmetryGroups=symm_groups)
rmsd = calculator.oneVsFollowing(0)[0]
print('RMSD from calculator.oneVsFollowing(0)', rmsd) # now it works, is 0.0 Angstrom !
#but rmsd from pairwiseRMSDMatrix() is still wrong!:
print('RMSD from calculator.pairwiseRMSDMatrix',calculator.pairwiseRMSDMatrix()[0])
###############################
# let's try without ambiguity: #
###############################
calculator = pyRMSD.RMSDCalculator.RMSDCalculator(
'NOSUP_OMP_CALCULATOR',
fittingCoordsets=conforms)
rmsd = calculator.oneVsFollowing(0)[0]
print('RMSD from calculator.oneVsFollowing(0) WITHOUT AMBUIGUITY', rmsd) # without ambiguity, the same value as from get_rmsds_matrix!
#but rmsd from pairwiseRMSDMatrix() is still wrong!:
print('RMSD from calculator.oneVsFollowing(0) WITHOUT AMBUIGUITY', calculator.pairwiseRMSDMatrix()[0]) # same here
- Yes, passes.
- Hmm, strange, I think Shruthi said she could reproduce. Still, with ambiguity should be much lower than 76A.
from imp-sampcon.
With the previous version of Jan's script pyRMSD_bug.zip
I could reproduce the numbers 2 A and 114 A. Looks like the script changed to include a selection.
from imp-sampcon.
Related Issues (20)
- Debug print outs need to be removed
- feature request - more options for subunit seection in RMSD HOT 4
- Consolidate duplicated code HOT 1
- Ambiguity and alignment does not work. HOT 12
- Parallelizing the clustering step to improve efficiency
- EM map and localization densities are not aligned HOT 1
- Parallelize the I/O step before clustering
- Multi-element symm groups
- Domain densities unavailable
- Allow for complexes while setting permutations for ambiguity
- selection of ranges in pdb files? HOT 1
- Large memory usage with many cores in clustering
- Add extra metadata to cluster centroid RMF to aid in mmCIF generation
- rmf_slice output in select_good_scoring_models is long and not helpful HOT 1
- select_good_scoring_models does not create scoreX.txt files
- Handle multi-state models HOT 1
- Handle ambiguity HOT 1
- Merge into IMP proper HOT 3
- Use PMI stat file handling functions HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imp-sampcon.