Hi Carsten,
I see how the loading of both pdb files can be a desired feature, but I also recall reading somewhere that command line params take precedence over .def files, which in turn takes precedence over defaults. There seems to be some deviation from that philosophy.
Each parameter has a bunch of associated attributes to control the behavior. The attribute that causes trouble here is .multiple=True. It means that you can specify multiple values. Values accumulate in the order given. .multiple=True is used in many places and in general this feature works well, but in the case of the pdb file name it sometimes causes confusion. Unfortunately I don't see an obvious way around this. It would be possible to support something like pdb.file_name==your.pdb, where == means discard all accumulated values and start over with the new value, but that wouldn't be very intuitive. Or we'd have to stop supporting reading of multiple pdb files. I wonder if you could achieve your goals with a different approach. The idea is not to use the .def files produced by phenix.refine. I'm guessing you're doing this because they contain all your accumulated customizations defined via the command line. Could you organize your workflow to accumulate the customizations in a separate file, then pass that file as another argument? E.g.: Content of "params" file: refinement.main.macro_cycles=5 refinement.main.high_resolution=3 phenix.refine my.pdb params
This also would help future automation we are implementing, because it would eliminate the need to read and parse an existing .def. file.
Parsing and rewriting a .def file is very easy from Python. If you have phenix, you also have both Python and a parameter file parser and writer. The "phil" parser/writer is documented in this newsletter article: http://cci.lbl.gov/publications/download/iucrcompcomm_jan2005.pdf I could help you getting started if that's an interesting alternative. If you can think of a more intuitive way of handling the interaction of parameters with multiple values and command-line parameters, please let me know! Ralf