Skip to content

Commit

Permalink
chore: tmp remove rdkit
Browse files Browse the repository at this point in the history
  • Loading branch information
timurbazhirov committed Feb 2, 2024
1 parent 5f53a2c commit 16423b3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 44 deletions.
5 changes: 3 additions & 2 deletions express/parsers/molecule.py
@@ -1,5 +1,5 @@
import ase.io
import rdkit.Chem
# import rdkit.Chem
from io import StringIO
from typing import Dict, Tuple

Expand All @@ -19,7 +19,8 @@ class MoleculeParser(StructureParser):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.ase_format = ASE_FORMATS[self.structure_format]
self.inchi_long, self.inchi = self.get_inchi()
self.inchi_long, self.inchi = "", ""
# self.inchi_long, self.inchi = self.get_inchi()

def get_rdkit_mol(self) -> rdkit.Chem.Mol:

Check failure on line 25 in express/parsers/molecule.py

View workflow job for this annotation

GitHub Actions / run-linter (3.8.x)

Ruff (F821)

express/parsers/molecule.py:25:32: F821 Undefined name `rdkit`

Check failure on line 25 in express/parsers/molecule.py

View workflow job for this annotation

GitHub Actions / run-linter (3.9.x)

Ruff (F821)

express/parsers/molecule.py:25:32: F821 Undefined name `rdkit`

Check failure on line 25 in express/parsers/molecule.py

View workflow job for this annotation

GitHub Actions / run-linter (3.10.x)

Ruff (F821)

express/parsers/molecule.py:25:32: F821 Undefined name `rdkit`

Check failure on line 25 in express/parsers/molecule.py

View workflow job for this annotation

GitHub Actions / run-linter (3.11.x)

Ruff (F821)

express/parsers/molecule.py:25:32: F821 Undefined name `rdkit`
"""
Expand Down
4 changes: 2 additions & 2 deletions express/properties/material.py
Expand Up @@ -3,7 +3,7 @@

from express.parsers.apps.vasp.parser import VaspParser
from express.parsers.crystal import CrystalParser
from express.parsers.molecule import MoleculeParser
# from express.parsers.molecule import MoleculeParser
from express.parsers.utils import lattice_basis_to_poscar
from express.properties import BaseProperty
from express.properties.non_scalar.symmetry import Symmetry
Expand Down Expand Up @@ -48,7 +48,7 @@ def __init__(self, name, parser, *args, **kwargs):
structure_string = lattice_basis_to_poscar(lattice, basis)

if self.is_non_periodic:
self.parser = MoleculeParser(
self.parser = CrystalParser(
structure_string=structure_string, structure_format=structure_format, cell_type=cell_type
)
else:
Expand Down
32 changes: 0 additions & 32 deletions tests/integration/parsers/test_molecule.py

This file was deleted.

3 changes: 3 additions & 0 deletions tests/integration/properties/test_material.py
@@ -1,4 +1,5 @@
import os
import unittest
from copy import deepcopy
from typing import Dict, List

Expand Down Expand Up @@ -75,6 +76,7 @@ def test_material_espresso_final_structure(self):
material = Material("material", self.espresso_parser, is_final_structure=True)
self.assertPropertiesEqual(material)

@unittest.skip("to avoid using rdkit tmp")
def test_material_is_non_periodic(self):
material = Material("material", self.vasp_parser, is_initial_structure=True, is_non_periodic=True)
self.assertPropertiesEqual(material)
Expand All @@ -90,6 +92,7 @@ def test_material_from_structure(self):
)
self.assertPropertiesEqual(material)

@unittest.skip("to avoid using rdkit tmp")
def test_material_serialize_and_validate(self):
material = Material("material", self.vasp_parser, is_initial_structure=True, is_non_periodic=True)
self.assertJsonEqual(material)
16 changes: 8 additions & 8 deletions tests/manifest.yaml
Expand Up @@ -220,8 +220,8 @@ test_structure_jarvis_db_entry_lattice_bravais:
structurePath: fixtures/structural/test-002/JVASP-677.json
structureFormat: jarvis-db-entry

test_molecule_inchi:
structurePath: fixtures/structural/test-001/POSCAR
# test_molecule_inchi:
# structurePath: fixtures/structural/test-001/POSCAR

test_material_vasp_initial_structure:
workDir: fixtures/vasp/test-001
Expand All @@ -239,17 +239,17 @@ test_material_espresso_final_structure:
workDir: fixtures/espresso/v5_4/test-001
stdoutFile: fixtures/espresso/v5_4/test-001/pw-scf.out

test_material_is_non_periodic:
workDir: fixtures/vasp/test-001
stdoutFile: fixtures/vasp/test-001/vasp.out
# test_material_is_non_periodic:
# workDir: fixtures/vasp/test-001
# stdoutFile: fixtures/vasp/test-001/vasp.out

test_material_from_structure:
structurePath: fixtures/espresso/v5_4/test-001/pw-scf.in
structureFormat: espresso-in

test_material_serialize_and_validate:
workDir: fixtures/vasp/test-001
stdoutFile: fixtures/vasp/test-001/vasp.out
# test_material_serialize_and_validate:
# workDir: fixtures/vasp/test-001
# stdoutFile: fixtures/vasp/test-001/vasp.out

test_espresso_hubbard_u:
workDir: fixtures/espresso/v7_2/test-007
Expand Down

0 comments on commit 16423b3

Please sign in to comment.