mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
- Restore mol writing functions in the RDKFuncs module (#7544)
- Add a couple of tests to avoid similar regressions in the future Co-authored-by: ptosco <paolo.tosco@novartis.com>
This commit is contained in:
@@ -32,9 +32,11 @@
|
||||
*/
|
||||
|
||||
%{
|
||||
#include <GraphMol/FileParsers/FileWriters.h>
|
||||
#include <GraphMol/FileParsers/MolWriters.h>
|
||||
%}
|
||||
|
||||
%include <GraphMol/FileParsers/FileWriters.h>
|
||||
%include <GraphMol/FileParsers/MolWriters.h>
|
||||
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ public class BasicMoleculeTests extends GraphMolTest {
|
||||
@Test public void testSmilesWrite() {
|
||||
String smi = mol1.MolToSmiles();
|
||||
assertEquals(smi,smi,"c1ccccc1");
|
||||
String smiRDKFuncs = RDKFuncs.MolToSmiles(mol1);
|
||||
assertEquals(smiRDKFuncs,smiRDKFuncs,smi);
|
||||
}
|
||||
@Test public void testAtoms() {
|
||||
assertEquals( mol1.getAtomWithIdx(0).getAtomicNum(),6);
|
||||
|
||||
@@ -152,6 +152,7 @@ public class Chemv2Tests extends GraphMolTest {
|
||||
|
||||
// System.out.print(template.MolToMolBlock());
|
||||
// System.out.print(m.MolToMolBlock());
|
||||
assertEquals(template.MolToMolBlock(), RDKFuncs.MolToMolBlock(template));
|
||||
Conformer c1 = template.getConformer();
|
||||
Conformer c2 = m.getConformer();
|
||||
assertEquals(c1.getAtomPos(0).getX(), c2.getAtomPos(6).getX(), defaultDoubleTol);
|
||||
|
||||
Reference in New Issue
Block a user