Skip to content
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

Remove openbabel dependency in qchem #2415

Merged
merged 11 commits into from
Apr 5, 2022
Merged

Remove openbabel dependency in qchem #2415

merged 11 commits into from
Apr 5, 2022

Conversation

soranjh
Copy link
Contributor

@soranjh soranjh commented Apr 4, 2022

Context:
This PR removes the qchem dependency to openbabel which was used for converting different molecular geometry formats to the xyz format. We can safely expect the users to perform such conversions. The PR also collects the general-purpose functions of qml.qchem in a new structure module. All the functions in the new structure module will be still accessible with qml.qchem.function_name.

Description of the Change:
The function read_structure is modified to remove its dependency to openbabel . The functions read_structure, active_space, excitations, hf_state and excitations_to_wires are moved inside structure.

Benefits:
Removing qchem dependencies.

Possible Drawbacks:

Related GitHub Issues:

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2022

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@soranjh soranjh changed the title Qchem utils Remove openbabel dependency in qchem Apr 4, 2022
@codecov
Copy link

codecov bot commented Apr 4, 2022

Codecov Report

Merging #2415 (79553ff) into master (bce2411) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2415      +/-   ##
==========================================
+ Coverage   99.43%   99.45%   +0.02%     
==========================================
  Files         243      244       +1     
  Lines       18987    18971      -16     
==========================================
- Hits        18879    18867      -12     
+ Misses        108      104       -4     
Impacted Files Coverage Δ
qchem/pennylane_qchem/qchem/__init__.py 100.00% <ø> (ø)
qchem/pennylane_qchem/qchem/openfermion_obs.py 100.00% <100.00%> (+1.50%) ⬆️
qchem/pennylane_qchem/qchem/structure.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bce2411...79553ff. Read the comment docs.

@soranjh soranjh marked this pull request as ready for review April 4, 2022 21:43
@soranjh soranjh requested a review from Jaybsoni April 4, 2022 22:00
@soranjh soranjh added the qchem ⚛️ Related to the QChem package label Apr 4, 2022
Copy link
Contributor

@obliviateandsurrender obliviateandsurrender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to go.

@josh146
Copy link
Member

josh146 commented Apr 5, 2022

@soranjh do you also need to remove openbabel from the various actions and docs? E.g.,

  • .github\workflows\tests.yml
  • doc\development\guide\installation.rst
  • doc\introduction\chemistry.rst
  • docker\qchem.dockerfile
  • qchem\install-dependencies.sh
  • qchem\README.rst

@soranjh
Copy link
Contributor Author

soranjh commented Apr 5, 2022

@soranjh do you also need to remove openbabel from the various actions and docs? E.g.,

Thanks @josh146. Removed openbabel everywhere.

doc/development/guide/installation.rst Show resolved Hide resolved
doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
@soranjh soranjh merged commit 3a519bf into master Apr 5, 2022
@soranjh soranjh deleted the qchem_utils branch April 5, 2022 23:59
@@ -17,7 +17,6 @@ FROM pennylane/base:latest
# Update and install Qchem
RUN DEBIAN_FRONTEND="noninteractive" apt-get install tzdata # need to perform this again
RUN apt-get update \
&& apt-get -y install --no-install-recommends make git openbabel \
Copy link
Member

@josh146 josh146 Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soranjh sorry I missed this one! But openbabel was only one of the packages being installed, do we still need make and git? If so, we will need to revert the line to

    && apt-get -y install --no-install-recommends make git \

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Josh. I am actually making my final PR to bring qchem inside pennylane and remove the need for installation. I can create a small PR just to retrieve this line during the few days transition period until that PR gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qchem ⚛️ Related to the QChem package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants