mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
Switch to isoelectronic valence model (#7491)
* change valence model to use isolobal analogy Remove support for five-coordinate C+ and, by analogy, five-coordinate N+2 Removes support for charge states that take atoms past the end of the periodic table i.e. [Lv-4] is no longer supported * update the tests for that * remove valence state of 6 for Al * fix representation of phosphate in the mol2 parser this is a correction of what was done during #5973 * cleanup the exceptions for P, S, As, and Se * drop valence states: Si 6, P 7, As 7 * a couple of additional changes from #7397 * update java tests * fix an inconsistency: Rb now supports valence -1 * documentation * - replace operator[] with at() for bounds check - extract some code into a function to avoid duplication - use TAB as separator throughout in the periodic table data for consistency * removing the .at() usage We know that these vectors aren't empty, so there's no need for the bounds check. --------- Co-authored-by: ptosco <paolo.tosco@novartis.com>
This commit is contained in:
@@ -50,6 +50,7 @@ public class AromaticTests extends GraphMolTest {
|
||||
@Test
|
||||
public void testNCIAromaticRegression() throws Exception {
|
||||
String filePath = getFilePath("NCI_aromat_regress.txt");
|
||||
// assertEquals(filePath,"foo");
|
||||
performAromaticTest(filePath,0);
|
||||
}
|
||||
|
||||
|
||||
@@ -980,8 +980,9 @@ public class SmilesDetailsTests extends GraphMolTest {
|
||||
Bond bond;
|
||||
String smi;
|
||||
|
||||
|
||||
smi = "C1CC[C+]1=1CCC1";
|
||||
mol = RWMol.MolFromSmiles(smi);
|
||||
mol = RWMol.MolFromSmiles(smi, 0, false);
|
||||
assertNotNull(mol);
|
||||
bond = mol.getBondBetweenAtoms(3, 0);
|
||||
assertNotNull(bond);
|
||||
@@ -991,7 +992,7 @@ public class SmilesDetailsTests extends GraphMolTest {
|
||||
assertEquals(Bond.BondType.DOUBLE, bond.getBondType());
|
||||
|
||||
smi = "C1CC[C+]=11CCC1";
|
||||
mol = RWMol.MolFromSmiles(smi);
|
||||
mol = RWMol.MolFromSmiles(smi, 0, false);
|
||||
assertNotNull(mol);
|
||||
bond = mol.getBondBetweenAtoms(3, 0);
|
||||
assertNotNull(bond);
|
||||
|
||||
@@ -87,8 +87,8 @@ public class SmilesTests extends GraphMolTest {
|
||||
// testing molecules which have been problematic
|
||||
@Test
|
||||
public void testProblems() {
|
||||
testSpellings("[Al+3]CCC",
|
||||
new String[] { "CCC[Al+3]", "C(C)(C[Al+3])"});
|
||||
testSpellings("[Al+2]CCC",
|
||||
new String[] { "CCC[Al+2]", "C(C)(C[Al+2])"});
|
||||
testSpellings("C(=O)(Cl)CC(=O)Cl",
|
||||
new String[] { "ClC(CC(Cl)=O)=O", "C(Cl)(=O)CC(=O)Cl","C(Cl)(=O)CC(Cl)=O"});
|
||||
testSpellings("C(=O)(Cl)c1ccc(C(=O)Cl)cc1",
|
||||
|
||||
Reference in New Issue
Block a user