capture reply from run(session, command)

Hello I was wondering if it is possible to capture the output that goes to the log when you run the python command run(session, command). For example if I run: run(session, "mmaker #2/A to #1/A”) Can I store in a variable the reply in the log file that has information about the RSMD? Sean

Hi Sean, That command returns information about the matching, as documented in the doc string for the chimerax.match_maker.match() function, the pertinent part of which I've pasted below. Note that unless you use tonight's daily build you will have to use 'matchmaker' instead of 'mmaker' as the command name. 'mmaker' is an alias, and return values from aliases were being mistakenly embedded into two extra levels of lists. Returns a list of dictionaries, one per chain pairing. The dictionaries are: { "full ref atoms": chimerax.atomic.Atoms "full match atoms": chimerax.atomic.Atoms "final ref atoms": chimerax.atomic.Atoms "final match atoms": chimerax.atomic.Atoms "final RMSD": float "full RMSD": float "transformation matrix": chimerax.geometry.Place "aligned ref seq": chimerax.atomic.StructureSeq "aligned match seq": chimerax.atomic.StructureSeq } "full" is before iteration pruning and "final" is afterward. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Sep 8, 2021, at 3:16 AM, Sean Connell via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hello I was wondering if it is possible to capture the output that goes to the log when you run the python command run(session, command). For example if I run:
run(session, "mmaker #2/A to #1/A”)
Can I store in a variable the reply in the log file that has information about the RSMD?
Sean
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users

I should also say that that function changed over from returning tuples to returning dictionaries relatively recently (August 11), so you will have to use a daily build instead of the 1.2.5 release. --Eric
On Sep 8, 2021, at 10:11 AM, Eric Pettersen via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Sean, That command returns information about the matching, as documented in the doc string for the chimerax.match_maker.match() function, the pertinent part of which I've pasted below. Note that unless you use tonight's daily build you will have to use 'matchmaker' instead of 'mmaker' as the command name. 'mmaker' is an alias, and return values from aliases were being mistakenly embedded into two extra levels of lists.
Returns a list of dictionaries, one per chain pairing. The dictionaries are: { "full ref atoms": chimerax.atomic.Atoms "full match atoms": chimerax.atomic.Atoms "final ref atoms": chimerax.atomic.Atoms "final match atoms": chimerax.atomic.Atoms "final RMSD": float "full RMSD": float "transformation matrix": chimerax.geometry.Place "aligned ref seq": chimerax.atomic.StructureSeq "aligned match seq": chimerax.atomic.StructureSeq } "full" is before iteration pruning and "final" is afterward.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Sep 8, 2021, at 3:16 AM, Sean Connell via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hello I was wondering if it is possible to capture the output that goes to the log when you run the python command run(session, command). For example if I run:
run(session, "mmaker #2/A to #1/A”)
Can I store in a variable the reply in the log file that has information about the RSMD?
Sean
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
participants (2)
-
Eric Pettersen
-
Sean Connell