File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,9 @@ def main(args: "CliArgs"):
2929 coordinates_path = args .coordinates_file .path if args .coordinates_file else None
3030
3131 # Storing cli arguments into settings.
32- s = get_settings ()
33- s .chain_detection .distance_cutoff = args .bond_threshold
32+ settings = get_settings ()
33+ settings .chain_detection .distance_cutoff = args .bond_threshold
34+ settings .output .atom_ids = not args .no_atom_ids
3435
3536 logger .info (f"Processing structure file: { structure_path } " )
3637
@@ -42,11 +43,12 @@ def main(args: "CliArgs"):
4243 structure_file_checksum = _get_checksum (structure_path ),
4344 database_version = get_database_version (),
4445 grodecoder_version = get_version (),
45- input_settings = s ,
46+ input_settings = settings ,
4647 )
4748
4849 # Serialization.
49- serialization_mode = "compact" if args .no_atom_ids else "full"
50+ logger .debug ("Creating json output" )
51+ serialization_mode = "full" if settings .output .atom_ids else "compact"
5052
5153 # Updates run time as late as possible.
5254 output_json = output .model_dump (context = {"serialization_mode" : serialization_mode })
Original file line number Diff line number Diff line change @@ -155,9 +155,15 @@ class ResolutionDetectionSettings(BaseSettings):
155155 distance_cutoff : float = 1.6
156156
157157
158+ class OutputSettings (BaseSettings ):
159+ # should we output atom ids?
160+ atom_ids : bool = True
161+
162+
158163class Settings (BaseSettings ):
159164 resolution_detection : ResolutionDetectionSettings = ResolutionDetectionSettings ()
160165 chain_detection : ChainDetectionSettings = ChainDetectionSettings ()
166+ output : OutputSettings = OutputSettings ()
161167
162168 debug : bool = False
163169
You can’t perform that action at this time.
0 commit comments