Browse Source

Merge branch 'dev-sb-strucmotif-2-residues'

# Conflicts:
#	CHANGELOG.md
#	package-lock.json
#	package.json
Sebastian Bittrich 3 years ago
parent
commit
2e61979cb0
2 changed files with 6 additions and 2 deletions
  1. 4 0
      CHANGELOG.md
  2. 2 2
      src/viewer/ui/strucmotif.tsx

+ 4 - 0
CHANGELOG.md

@@ -2,6 +2,10 @@
 
 [Semantic Versioning](https://semver.org/)
 
+## Unreleased
+### General
+- RO-2766: Allow strucmotif of 2 residues
+
 ## [2.1.1] - 2022-02-07
 ### General
 - Mol* 3.1.0 (Quick Styles panel, default representation tweaks)

+ 2 - 2
src/viewer/ui/strucmotif.tsx

@@ -29,7 +29,7 @@ import { ViewerState } from '../types';
 const ABSOLUTE_ADVANCED_SEARCH_URL = 'https://rcsb.org/search?query=';
 const RELATIVE_ADVANCED_SEARCH_URL = '/search?query=';
 const RETURN_TYPE = '&return_type=assembly';
-const MIN_MOTIF_SIZE = 3;
+const MIN_MOTIF_SIZE = 2;
 const MAX_MOTIF_SIZE = 10;
 export const MAX_EXCHANGES = 4;
 const MAX_MOTIF_EXTENT = 15;
@@ -217,7 +217,7 @@ class SubmitControls extends PurePluginUIComponent<{}, { isBusy: boolean, residu
 
             if (!contact) {
                 const { residueId } = coordinates[i];
-                alert(`Residue ${residueId.label_seq_id} | ${residueId.label_asym_id} | ${residueId.struct_oper_id} needs to be less than 15 \u212B from another residue - Consider adding more residues to connect far-apart residues.`);
+                alert(`Residue ${residueId.label_seq_id} | ${residueId.label_asym_id} | ${residueId.struct_oper_id} needs to be less than ${MAX_MOTIF_EXTENT} \u212B from another residue - Consider adding more residues to connect far-apart residues.`);
                 return;
             }
         }