covariance_matrix

31 views
Skip to first unread message

Jiří Průša

unread,
Nov 21, 2021, 5:02:29 PM11/21/21
to MDnalysis discussion
Hello guys,
method
MDAnalysis.analysis.encore.covariance.covariance_matrix(ensemble, select='name CA', estimator=<function shrinkage_covariance_estimator>, weights='mass', reference=None)
raise an error
passing <class 'MDAnalysis.core.universe.Universe'> class as reference.
Must have changed lines 216,218:
"
reference_atom_selection = reference.select_atoms( ensemble.get_atom_selection_string()) reference_coordinates = reference_atom_selection.atoms.coordinates()
"
to:
"
reference_atom_selection = reference.select_atoms(
select)
reference_coordinates = reference_atom_selection.atoms.positions
"
Am I passing wrong argument or is it an issue of method method?

Oliver Beckstein

unread,
Nov 22, 2021, 7:57:43 PM11/22/21
to mdnalysis-discussion
Hi Jiri,

welcome to the miling list. Sorry, I don’t manage to get the accents on your name right.

I think you’re right that this should be atoms.positions instead of atoms.coordinates() in https://github.com/MDAnalysis/mdanalysis/blob/46c8badd8b8967dc25f8125ef87582490ab497e3/package/MDAnalysis/analysis/encore/covariance.py#L218 

I raised issue https://github.com/MDAnalysis/mdanalysis/issues/3467 — given that you already proposed the fix, do you want to contribute it as a pull request?


Best,
Oliver
--
Oliver Beckstein (he/his/him)


MDAnalysis – a NumFOCUS fiscally sponsored project




Reply all
Reply to author
Forward
0 new messages