Skip to content

Commit

Permalink
- checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskovar-m2ms committed Mar 14, 2024
1 parent b48fc7d commit 6aa5108
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docker-compose.dev.vector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ services:
start_period: 10s
web:
container_name: web_dock
image: xchem/fragalysis-stack:latest
# image: xchem/fragalysis-stack:latest
# image: alanbchristie/fragalysis-backend:1187.3
# image: boriskovarm2ms/fragalysis-stack:experiment2
# image: kaliif/fragalysis-backend:latest
image: kaliif/fragalysis-backend:latest
command: /bin/bash /code/launch-stack.sh
volumes:
- ../data/logs:/code/logs/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ const DatasetMoleculeView = memo(
// #1249 dataset molecules currently could use side observation molecule for some renders
const allMolecules = useSelector(state => state.apiReducers.all_mol_lists);
const [pdbData, setPdbData] = useState(null);
const [isCustomPdb, setIsCustomPdb] = useState(false);
const isPdbAvailable = !!(data && (data.pdb_info || pdbData));

useEffect(() => {
Expand All @@ -470,7 +471,8 @@ const DatasetMoleculeView = memo(
setPdbData(molecule);
}
} else {
setPdbData(data.pdb_info);
setPdbData(data);
setIsCustomPdb(true);
}
}, [data, allMolecules]);

Expand Down
20 changes: 17 additions & 3 deletions js/components/datasets/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,17 @@ export const loadDatasetCompoundsWithScores = (datasetsToLoad = null) => (dispat
// -----> add 'site_observation_code' to molecules whereas '/compound-molecules' has more molecule info so far, can be removed later
const compondMolecules = await api({ url: `${base_url}/api/compound-molecules/?compound_set=${dataset.id}` });
const compondMoleculesMap = {};
compondMolecules.data.results.forEach(molecule => compondMoleculesMap[molecule.name] = molecule.site_observation_code);
compondMolecules.data.results.forEach(
molecule =>
(compondMoleculesMap[molecule.name] = {
site_observation_code: molecule.site_observation_code,
pdb_info: molecule.pdb_info
})
);
response.data.results.forEach(molecule => {
if (compondMoleculesMap.hasOwnProperty(molecule.name)) {
molecule['site_observation_code'] = compondMoleculesMap[molecule.name];
molecule['site_observation_code'] = compondMoleculesMap[molecule.name].site_observation_code;
molecule['pdb_info'] = compondMoleculesMap[molecule.name].pdb_info;
}
});
// <-----
Expand Down Expand Up @@ -1331,7 +1338,14 @@ export const moveSelectedMoleculeSettings = (
let representations = getRepresentationsByType(data.objectsInView, newItem, OBJECT_TYPE.PROTEIN, datasetID);
promises.push(
dispatch(
addDatasetHitProtein(stage, newItem, getRandomColor(newItem), datasetIdOfMolecule, skipTracking, representations)
addDatasetHitProtein(
stage,
newItem,
getRandomColor(newItem),
datasetIdOfMolecule,
skipTracking,
representations
)
)
);
}
Expand Down

0 comments on commit 6aa5108

Please sign in to comment.