core and pdbfit

Issue #100 resolved
Lars Skjærven created an issue

I've been wanting to do the following a few times:

core <- core.find(pdbs)
xyz <- pdbfit(pdbs, core)

This will work since core has the xyz attribute. But since xyz is "xyz indices of core atoms at each round", it will not provide what you want. correct? Should we consider to rename atom and xyz to avoid this potential misunderstanding?

Comments (6)

  1. Xinqiu Yao

    Right, core$atom contains all atoms actually. Maybe consider changing to all.atom and all.xyz? Meanwhile, change the names of $c1A.atom and $c1A.xyz to $atom and $xyz, making them default cores. Otherwise we need one more step calling print(core) to get the same results. What do you think, Barry?

  2. Barry Grant

    This change sounds sensible. We will need to change core.find(), print.core() and also perhaps update some Rd file example sections. I originally intended print.core() to allow selection of any core size within the range of returned values, which I am guessing will be unaffected.

  3. Xinqiu Yao

    Hi,

    I've updated core.find() and print.core() to adapt to the change of atom and xyz to all.atom and all.xyz, respectively, in the return value of core.find(). These changes don't affect the option of calling print.core() to get any core size. I don't change c1A.atom to atom (or c1A.xyz to xyz) because I think it is better to force users to call print.core() to get the core positions they want. Up to now I haven't found any example need to update because of these changes. Let me know what you think!

  4. Lars Skjærven reporter

    hmm.. I think it would be the most intuitive attributes xyz and atom contains the indices of the "final" core - e.g. the c0.5A. we use those attributes for pretty much everything else. that way you can also use the core object directly e.g. to pdbfit().

    for the iterations - how about something like step.inds - and perhaps only keep the xyz or the atom indices of each round. ?

  5. Xinqiu Yao

    I actually use c1A. But it is fine to me to keep the final core in xyz and atom. Note that user can stop at any volume with argument stop.vol or stop.at. So, core$atom may not alway be equal to $c0.5A.atom.

    It makes sense to keep only one set of indices, maybe atom, to store result of each round iteration. step.inds is good.

  6. Log in to comment