Skip to content

Commit

Permalink
CRDGEN-270 Add template for bicyclic pentane (#87)
Browse files Browse the repository at this point in the history
Adds a template for C1C2CC1C2 aka bicycle (1.1.1) pentane. I had to change the ring system simplification logic slightly so that the template is picked up.
  • Loading branch information
ZontaNicola authored Mar 30, 2021
1 parent 187419a commit f67ad5d
Show file tree
Hide file tree
Showing 5 changed files with 3,247 additions and 2,496 deletions.
6 changes: 6 additions & 0 deletions CoordgenFragmentBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,12 @@ void CoordgenFragmentBuilder::simplifyRingSystem(
/* disable rings that share too many atoms */
n++;
}
if (r->fusionAtoms.at(ringCounter).size() == 3 &&
r->size() == 4 &&
fusedRing->size() == 4) {
/* don't separate rings of bicyclo (1,1,1) pentane so we can use a template instead */
n++;
}
}
}
if (n == 1) /* ring is fused with only one ring,
Expand Down
29 changes: 27 additions & 2 deletions CoordgenTemplates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// $SCHRODINGER/run mol_generator.py templates.mae
//
// generated using templates.mae version c17d2be57897d3e83435.
// generated using templates.mae version 92d3dcc2b6d37e859c01.
//


Expand Down Expand Up @@ -47,7 +47,7 @@ namespace schrodinger {

std::vector<sketcherMinimizerMolecule*> coordgen_templates()
{
std::vector<sketcherMinimizerMolecule*> molecules(80);
std::vector<sketcherMinimizerMolecule*> molecules(81);
size_t i = 0;


Expand Down Expand Up @@ -4807,6 +4807,31 @@ std::vector<sketcherMinimizerMolecule*> coordgen_templates()
++i;
}

{
auto molecule = new sketcherMinimizerMolecule();
std::array<std::tuple<int, float, float>, 5> atoms = {{
tuple<int, float, float>(6, -0.5833f, -0.0f),
tuple<int, float, float>(6, 0.0f, 0.5833f),
tuple<int, float, float>(6, 0.5833f, -0.0f),
tuple<int, float, float>(6, 0.0f, -0.5833f),
tuple<int, float, float>(6, 0.1458f, -0.0f)
}};
std::array<std::array<int, 3>, 6> bonds = {{
{ 0, 1, 1 },
{ 0, 3, 1 },
{ 1, 2, 1 },
{ 1, 4, 1 },
{ 2, 3, 1 },
{ 3, 4, 1 }
}};

add_atoms(molecule, atoms);
add_bonds(molecule, bonds);

molecules[i] = molecule;
++i;
}


return molecules;
}
Expand Down
2 changes: 1 addition & 1 deletion CoordgenTemplates.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// $SCHRODINGER/run mol_generator.py templates.mae
//
// generated using templates.mae version c17d2be57897d3e83435.
// generated using templates.mae version 92d3dcc2b6d37e859c01.
//


Expand Down
Loading

0 comments on commit f67ad5d

Please sign in to comment.