ReliaSolve / cctbx_project

Computational Crystallography Toolbox
https://cctbx.github.io
Other
0 stars 0 forks source link

Print the Phil arguments in the probe2 output files #140

Open russell-taylor opened 2 years ago

russell-taylor commented 2 years ago

While these are reported in standard output, they are also needed to help know exactly what parameters were used to produce a given output.

russell-taylor commented 2 years ago

The command-line arguments are now printed. When I figure out how to parse the Phil parameters and add them to a string, replace with that so we report all of the arguments even when they input another phil file.

russell-taylor commented 2 years ago

Billy writes:

The phil object has the "as_str" function that will show the phil. If the phil is just the difference, only the difference is shown. The code for the command line parser is in

https://github.com/cctbx/cctbx_project/blob/46650cdf7b8512cf75516afe75469fcb1fbcfbf3/iotbx/cli_parser.py#L578-L666

If you have a phil extract object, you can convert it back to a phil object with the master phil object. with the "format" function.

https://github.com/cctbx/cctbx_project/blob/46650cdf7b8512cf75516afe75469fcb1fbcfbf3/iotbx/cli_parser.py#L376-L378

and an example is in mmtbx/command_line/pdb_atom_selection.py

The str will have newlines, so if you want a single line, you would have to remove those characters.

russell-taylor commented 1 year ago

Gonna need Billy's deeper help with this. The examples he points to and the online docs and grepping the code don't get me there.