Hi Thibault,
Welcome to the MDAnalysis mailing list.
You discovered a bug in the latest version of the user guide. It should read
projected = np.outer(trans1, pc1) + pc.mean.flatten()
because at this point, the outer product has shape (98,2565) so we reshape pc.mean into an 1d array with 2565 components. Then the rest works.
coordinates = projected.reshape(len(trans1), -1, 3)
proj1 = mda.Merge(backbone)
proj1.load_new(coordinates, order="fac”)
# write PDB and TRR for viz in external program
proj1.atoms.write("bb.pdb”)
proj1.atoms.write("bb.trr", frames="all”)
Hope this helps.
Oliver
> --
> You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
mdnalysis-discus...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/mdnalysis-discussion/e7056092-5e9d-4306-b2e0-a314d468a8a4n%40googlegroups.com.
--
Oliver Beckstein (he/his/him)
orbe...@gmail.com