-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test that we can make a sample molecule for every atom type. #1661
Commits on May 16, 2023
-
Test that we can make a sample molecule for every atom type.
This unit test was inspired by efforts to debug something in some changes to the database, which caused a segfault when running the database Tests, but was in fact caused by an undetected bug in RMG. This should detect similar bugs. The idea is that for every atomType, such as 'Cds', the method Group().make_sample_molecule() can create a molecule from the group definition, eg. 1 Cd ux should make the molecule 1 C u0 p0 c0 {2,D} {3,S} {4,S} 2 C u0 p0 c0 {1,D} {5,S} {6,S} 3 H u0 p0 c0 {1,S} 4 H u0 p0 c0 {1,S} 5 H u0 p0 c0 {2,S} 6 H u0 p0 c0 {2,S} Many work, but quite a few fail. Updated to RMG3/Python3.
Configuration menu - View commit details
-
Copy full SHA for ac65f3c - Browse repository at this point
Copy the full SHA ac65f3cView commit details -
Add undeclared charged atom type in group.make_sample_molecule()
We have a hard-coded list of charged atom types here. It was missing one.
Configuration menu - View commit details
-
Copy full SHA for ed2eca3 - Browse repository at this point
Copy the full SHA ed2eca3View commit details -
Replace hard-coded list of charged atomtypes with check for charge.
The atomtypes each have a charge list - let's just see if it matches.
Configuration menu - View commit details
-
Copy full SHA for 316f840 - Browse repository at this point
Copy the full SHA 316f840View commit details -
Include N5bd as a benzene "carbon" when generating sample molecules.
When you create a molecule from a functional group definition that declares implicit benzene rings by using a "benzene" atom type, it creates benzene rings. This algorithm contains a list of "benzene" atom types. It's hard-coded. And missing some. This adds one, to check that adding one fixes things. With this fix, the following line works: rmgpy.molecule.Group().from_adjacency_list('1 N5bd ux').make_sample_molecule()
Configuration menu - View commit details
-
Copy full SHA for 14795ec - Browse repository at this point
Copy the full SHA 14795ecView commit details -
Group.is_benzene_explicit() checks more benzenic atom types.
Before it had a hard-coded list (that was missing some). Now any atomtype that is declared as having at least one benzene bond is counted.
Configuration menu - View commit details
-
Copy full SHA for 1046d13 - Browse repository at this point
Copy the full SHA 1046d13View commit details -
Added more aromatic atom types to classify_benzene_carbons()
This helps generating sample molecules for certain atomtypes. Now lines like this work: rmgpy.molecule.Group().from_adjacency_list('1 P3b ux').make_sample_molecule()
Configuration menu - View commit details
-
Copy full SHA for 2a63daf - Browse repository at this point
Copy the full SHA 2a63dafView commit details -
Make failing atomtype tests into "work in progress"
Fixing O4b and S4b will be nontrivial, so rather than fix them I'm marking them as "work in progress" (expected to fail)
Configuration menu - View commit details
-
Copy full SHA for 049e92f - Browse repository at this point
Copy the full SHA 049e92fView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb09fcc - Browse repository at this point
Copy the full SHA bb09fccView commit details -
Added a work in progress atomtype test: make sample molecule.
Ideally we could make a molecule from every atom type definition that matches that atom type. This is a work in progress test, because we can't. Two (marked in previous tests) crash. Some others create molecules, but they don't seem to match the functional group they were designed to match.
Configuration menu - View commit details
-
Copy full SHA for 15ca27e - Browse repository at this point
Copy the full SHA 15ca27eView commit details