Skip to content

Commit

Permalink
Ignore non searchable waters and skip if user wants to preserve topology
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
lohedges committed Aug 4, 2023
1 parent 2702a20 commit 636b5cb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions corelib/src/libs/SireIO/grotop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4341,8 +4341,14 @@ GroTop::GroTop(const SireSystem::System &system, const PropertyMap &map)
isSorted = map["sort"].value().asA<BooleanProperty>().value();
}

// Search the system for water molecules.
auto waters = system.search("water and not resname XTL");
// Search the system for water molecules. Crystal waters are labelled
// using a residue name of XTL. If the user wants to preserve their own
// naming convention, then water molecules are flagged as being "non-searchable".
SelectResult waters;
if (not system.propertyKeys().contains("skip_water"))
{
waters = system.search("(not mols with property is_non_searchable_water) and (water and not resname XTL)");
}

// Search for any crystal waters.
auto xtal_waters = system.search("resname XTL");
Expand Down

0 comments on commit 636b5cb

Please sign in to comment.