Skip to content

Commit

Permalink
Merge pull request #483 from xchem/m2ms-1166
Browse files Browse the repository at this point in the history
Renamed fo-fc and 2fo-fc files to sigmaa and diff
  • Loading branch information
kaliif authored Jan 8, 2024
2 parents 1e9917a + e57fba8 commit f2d908b
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 16 deletions.
12 changes: 6 additions & 6 deletions viewer/download_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
'cif_info': ('aligned'),
'mtz_info': ('aligned'),
# 'map_info': ('aligned'),
'xmap_2fofc_file': ('aligned'),
'xmap_fofc_file': ('aligned'),
'sigmaa_file': ('aligned'),
'diff_file': ('aligned'),
'event_file': ('aligned'),
'sdf_info': ('aligned'),
'single_sdf_file': (''),
Expand All @@ -53,8 +53,8 @@
'cif_info': {}, # from experiment
'mtz_info': {}, # from experiment
'event_file': {}, # x
'xmap_fofc_file': {}, # renamed from xmap_fofc_file and xmap_2fofc_file
'xmap_2fofc_file': {},
'diff_file': {}, # renamed from diff_file and sigmaa_file
'sigmaa_file': {},
},
'molecules': {
'sdf_files': {},
Expand Down Expand Up @@ -654,8 +654,8 @@ def get_download_params(request):
'cif_info',
'mtz_info',
'event_file',
'xmap_2fofc_file',
'xmap_fofc_file',
'sigmaa_file',
'diff_file',
]

other_param_flags = ['sdf_info', 'single_sdf_file', 'metadata_info', 'smiles_info']
Expand Down
32 changes: 32 additions & 0 deletions viewer/migrations/0028_auto_20240108_1114.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Generated by Django 3.2.23 on 2024-01-08 11:14

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
('viewer', '0027_rename_lhs_pdb_in_computedmolecule'),
]

operations = [
migrations.RenameField(
model_name='historicalsiteobservation',
old_name='xmap_fofc_file',
new_name='diff_file',
),
migrations.RenameField(
model_name='historicalsiteobservation',
old_name='xmap_2fofc_file',
new_name='sigmaa_file',
),
migrations.RenameField(
model_name='siteobservation',
old_name='xmap_fofc_file',
new_name='diff_file',
),
migrations.RenameField(
model_name='siteobservation',
old_name='xmap_2fofc_file',
new_name='sigmaa_file',
),
]
4 changes: 2 additions & 2 deletions viewer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ class SiteObservation(models.Model):
apo_file = models.FileField(
upload_to="target_loader_data/", null=True, max_length=255
)
xmap_2fofc_file = models.FileField(
sigmaa_file = models.FileField(
upload_to="target_loader_data/", null=True, max_length=255
)
xmap_fofc_file = models.FileField(
diff_file = models.FileField(
upload_to="target_loader_data/", null=True, max_length=255
)
event_file = models.FileField(
Expand Down
4 changes: 2 additions & 2 deletions viewer/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,9 @@ class DownloadStructuresSerializer(serializers.Serializer):
bound_file = serializers.BooleanField(default=False)
cif_info = serializers.BooleanField(default=False)
mtz_info = serializers.BooleanField(default=False)
xmap_fofc_file = serializers.BooleanField(default=False)
diff_file = serializers.BooleanField(default=False)
event_file = serializers.BooleanField(default=False)
xmap_2fofc_file = serializers.BooleanField(default=False)
sigmaa_file = serializers.BooleanField(default=False)
sdf_info = serializers.BooleanField(default=False)
single_sdf_file = serializers.BooleanField(default=False)
metadata_info = serializers.BooleanField(default=False)
Expand Down
12 changes: 6 additions & 6 deletions viewer/target_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,8 @@ def process_site_observation(
apo_file,
artefacts_file,
ligand_mol,
xmap_2fofc_file,
xmap_fofc_file,
sigmaa_file,
diff_file,
event_file,
) = self.validate_files(
obj_identifier=experiment_id,
Expand All @@ -1057,8 +1057,8 @@ def process_site_observation(
recommended=(
"artefacts",
"ligand_mol",
"2Fo-Fc_map",
"Fo-Fc_map",
"2Fo-Fc_map", # NB! keys in meta_aligner not yet updated
"Fo-Fc_map", # NB! keys in meta_aligner not yet updated
"event_map",
),
)
Expand Down Expand Up @@ -1096,8 +1096,8 @@ def process_site_observation(
"apo_solv_file": str(self._get_final_path(apo_solv_file)),
"apo_desolv_file": str(self._get_final_path(apo_desolv_file)),
"apo_file": str(self._get_final_path(apo_file)),
"xmap_2fofc_file": str(self._get_final_path(xmap_2fofc_file)),
"xmap_fofc_file": str(self._get_final_path(xmap_fofc_file)),
"sigmaa_file": str(self._get_final_path(sigmaa_file)),
"diff_file": str(self._get_final_path(diff_file)),
"event_file": str(self._get_final_path(event_file)),
"artefacts_file": str(self._get_final_path(artefacts_file)),
"pdb_header_file": "currently missing",
Expand Down

0 comments on commit f2d908b

Please sign in to comment.