-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The requests for sorted constructed molecules and sorted building blocks were broken, as they were not returning any molecules. This was discovered simply by trying to view sorted constructed molecules and sorted building blocks in stk-vis. The origin of the bug for the sorted constructed molecules request was due to the fact that the the query in `sorted-constructed-molecules/Request.js` was wrong. It was filtering out constructed molecules, rather than keeping them. Probably due to copying code from the other requests and forgetting to edit it. Fixing this revealed a second bug in the request. When the molecules were getting sorted by "Num Atoms", the table had no "Num Bonds" entries, and vice versa. This was also happening in the sorted building blocks request. The reason for this is that I was returning `sortedBaseMolecules`, which did not contain the results of the data query, rather than `molecules`, which did. To help future debugging I've also made all the building blocks contain a value in the "Num Atoms" collection in the test database.
- Loading branch information
1 parent
771d59d
commit bf44af9
Showing
4 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ exports.query = | |
], | ||
}, | ||
{ | ||
'$eq': [ | ||
'$gt': [ | ||
{'$size': '$constructedMolecule'}, | ||
0, | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters