Skip to content

Commit

Permalink
Merge pull request #205 from jvalegre/jv_branch
Browse files Browse the repository at this point in the history
1. Hotfix remove dbstep default
  • Loading branch information
jvalegre authored Jul 30, 2024
2 parents 1163fe1 + a84765d commit 0ff76c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ jobs:
# install OpenBabel
conda install -y -c conda-forge openbabel=3.1.1
# install dependencies
conda install -y -c conda-forge xtb
conda install -y -c conda-forge crest
conda install -y -c conda-forge xtb=6.6.1
conda install -y -c conda-forge crest=2.12
pip install ase
conda install pytorch torchvision torchaudio cpuonly -c pytorch
pip install torchani==2.2.3
pip install dbstep
# install the dependencies of AQME with pip
pip install .
# install and run pytest
Expand Down
2 changes: 1 addition & 1 deletion aqme/qdescp.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
from rdkit import Chem
from rdkit.Chem import rdFMCS
from pathlib import Path
import dbstep.Dbstep as db
from aqme.utils import (
load_variables,
read_xyz_charge_mult,
Expand Down Expand Up @@ -800,6 +799,7 @@ def collect_xtb_properties(self,name_initial,atom_props,update_atom_props,smarts

# calculate DBSTEP descriptors
if self.args.dbstep_calc:
import dbstep.Dbstep as db
self.args.log.write(f"\no Running DBSTEP and collecting properties")

# calculates buried volume to the type of atom selected
Expand Down
10 changes: 1 addition & 9 deletions tests/test_qdescp.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_qdescp_xtb(file):
]

if file == 'test_atom.csv':
cmd_qdescp = cmd_qdescp + ["--qdescp_atoms", "[P]", "--dbstep_calc"]
cmd_qdescp = cmd_qdescp + ["--qdescp_atoms", "[P]"]

if file == "test_idx.csv":
cmd_qdescp = cmd_qdescp + ["--qdescp_atoms", "[1]"]
Expand Down Expand Up @@ -171,23 +171,17 @@ def test_qdescp_xtb(file):
assert round(Fermi_lvl_boltz_calc,2) == round(Fermi_lvl_boltz_csv,2)
assert pd_boltz["NumRotatableBonds"][0] == 3
assert pd_boltz["NumRotatableBonds"][1] == 4
assert 'DBSTEP_Vbur' not in pd_boltz

elif file in ['test_atom.csv','test_group.csv','test_multigroup.csv','test_robert.csv']:
pd_boltz = pd.read_csv(file_descriptors)

# mol_1 is methane and it doesn't have any P/O atoms or CC/C=O groups so the boltz json file shouldn't appear
assert os.path.exists(f'{folder_qdescp}/mol_1_rdkit_conf_1.json')
assert not os.path.exists(f'{folder_boltz}/mol_1_rdkit_boltz.json')
assert 'DBSTEP_Vbur' not in pd_boltz
assert len(pd_boltz["NumRotatableBonds"]) == 3

# check variables and X_ prefixes in variable names
if file in ['test_atom.csv','test_multigroup.csv','test_robert.csv']:
if file == 'test_atom.csv':
assert 'P_DBSTEP_Vbur' in pd_boltz
else:
assert 'P_DBSTEP_Vbur' not in pd_boltz
assert 'P_FUKUI+' in pd_boltz

if file == 'test_atom.csv':
Expand All @@ -197,8 +191,6 @@ def test_qdescp_xtb(file):
assert 'Name' not in pd_boltz

elif file == 'test_group.csv':
assert 'C=O_C_DBSTEP_Vbur' not in pd_boltz
assert 'C=O_O_DBSTEP_Vbur' not in pd_boltz
assert 'C=O_C_FUKUI+' in pd_boltz
assert 'C=O_O_FUKUI+' in pd_boltz

Expand Down

0 comments on commit 0ff76c0

Please sign in to comment.