Skip to content

Added a Linear TS search job adapter #695

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Added a Linear TS search job adapter #695

wants to merge 20 commits into from

Conversation

alongd
Copy link
Member

@alongd alongd commented Aug 21, 2023

Added a method for generating TS structures from atom mapped reactants and products.
The method works for unimolecular reactions, and at present is only implemented for isomerization reactions.

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Attention: Patch coverage is 87.93103% with 35 lines in your changes are missing coverage. Please review.

Project coverage is 73.97%. Comparing base (3631196) to head (cbec920).

Current head cbec920 differs from pull request most recent head 69759f8

Please upload reports for the commit 69759f8 to get more accurate results.

Files Patch % Lines
arc/job/adapters/ts/linear.py 75.63% 18 Missing and 11 partials ⚠️
arc/mapping/engine.py 86.66% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #695      +/-   ##
==========================================
+ Coverage   73.80%   73.97%   +0.17%     
==========================================
  Files          99      101       +2     
  Lines       27352    27596     +244     
  Branches     5718     5746      +28     
==========================================
+ Hits        20187    20415     +228     
- Misses       5738     5745       +7     
- Partials     1427     1436       +9     
Flag Coverage Δ
unittests 73.97% <87.93%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alongd alongd force-pushed the linear_ts branch 5 times, most recently from 8825e9f to cbec920 Compare May 15, 2024 07:02
@alongd alongd marked this pull request as ready for review May 15, 2024 09:26
from arc.plotter import save_geo
from arc.species.converter import order_xyz_by_atom_map, zmat_to_xyz
from arc.species.species import ARCSpecies, TSGuess, colliding_atoms
from arc.species.zmat import check_ordered_zmats, get_atom_order, update_zmat_by_xyz, xyz_to_zmat

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'get_atom_order' is not used.

Copilot Autofix

AI 3 months ago

To fix the problem, we need to remove the unused import statement for get_atom_order from the file arc/job/adapters/ts/linear.py. This will clean up the code and remove unnecessary dependencies, making the code easier to read and maintain.

Suggested changeset 1
arc/job/adapters/ts/linear.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/arc/job/adapters/ts/linear.py b/arc/job/adapters/ts/linear.py
--- a/arc/job/adapters/ts/linear.py
+++ b/arc/job/adapters/ts/linear.py
@@ -18,3 +18,3 @@
 from arc.species.species import ARCSpecies, TSGuess, colliding_atoms
-from arc.species.zmat import check_ordered_zmats, get_atom_order, update_zmat_by_xyz, xyz_to_zmat
+from arc.species.zmat import check_ordered_zmats, update_zmat_by_xyz, xyz_to_zmat
 
EOF
@@ -18,3 +18,3 @@
from arc.species.species import ARCSpecies, TSGuess, colliding_atoms
from arc.species.zmat import check_ordered_zmats, get_atom_order, update_zmat_by_xyz, xyz_to_zmat
from arc.species.zmat import check_ordered_zmats, update_zmat_by_xyz, xyz_to_zmat

Copilot is powered by AI and may make mistakes. Always verify output.
H -0.53390611 -2.06386676 -0.83047533
H -0.42088759 -4.06846526 -2.17670487
H 1.36205133 -3.75009763 -2.57288841""")])
cls.rxn_1.determine_family(rmg_database=cls.rmgdb)

Check failure

Code scanning / CodeQL

Wrong name for an argument in a call Error

Keyword argument 'rmg_database' is not a supported parameter name of
method ARCReaction.determine_family
.

Copilot Autofix

AI 3 months ago

To fix the problem, we need to ensure that the keyword argument used in the method call matches the parameter name expected by the determine_family method. We should check the method definition of determine_family in the ARCReaction class to find the correct parameter name and update the method call accordingly.

The best way to fix the problem without changing existing functionality is to replace the incorrect keyword argument rmg_database with the correct parameter name. This change should be made in the file arc/job/adapters/ts/linear_test.py on line 77 and line 101.

Suggested changeset 1
arc/job/adapters/ts/linear_test.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/arc/job/adapters/ts/linear_test.py b/arc/job/adapters/ts/linear_test.py
--- a/arc/job/adapters/ts/linear_test.py
+++ b/arc/job/adapters/ts/linear_test.py
@@ -76,3 +76,3 @@
                                                              H       1.36205133   -3.75009763   -2.57288841""")])
-        cls.rxn_1.determine_family(rmg_database=cls.rmgdb)
+        cls.rxn_1.determine_family(rmgdb=cls.rmgdb)
 
@@ -100,3 +100,3 @@
                                                              H       0.27058353   -0.73979548    1.43184405""")])
-        cls.rxn_2.determine_family(rmg_database=cls.rmgdb)
+        cls.rxn_2.determine_family(rmgdb=cls.rmgdb)
 
EOF
@@ -76,3 +76,3 @@
H 1.36205133 -3.75009763 -2.57288841""")])
cls.rxn_1.determine_family(rmg_database=cls.rmgdb)
cls.rxn_1.determine_family(rmgdb=cls.rmgdb)

@@ -100,3 +100,3 @@
H 0.27058353 -0.73979548 1.43184405""")])
cls.rxn_2.determine_family(rmg_database=cls.rmgdb)
cls.rxn_2.determine_family(rmgdb=cls.rmgdb)

Copilot is powered by AI and may make mistakes. Always verify output.
H -1.41423043 0.87863077 0.42354512
H 1.02430791 0.21530309 0.12674144
H 0.27058353 -0.73979548 1.43184405""")])
cls.rxn_2.determine_family(rmg_database=cls.rmgdb)

Check failure

Code scanning / CodeQL

Wrong name for an argument in a call Error

Keyword argument 'rmg_database' is not a supported parameter name of
method ARCReaction.determine_family
.

Copilot Autofix

AI 3 months ago

To fix the problem, we need to ensure that the correct parameter name is used when calling the determine_family method. This involves checking the method definition of determine_family in the ARCReaction class to find the correct parameter name and updating the call accordingly.

  • First, identify the correct parameter name expected by the determine_family method.
  • Update the call to determine_family on line 101 to use the correct parameter name.
Suggested changeset 1
arc/job/adapters/ts/linear_test.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/arc/job/adapters/ts/linear_test.py b/arc/job/adapters/ts/linear_test.py
--- a/arc/job/adapters/ts/linear_test.py
+++ b/arc/job/adapters/ts/linear_test.py
@@ -100,3 +100,3 @@
                                                              H       0.27058353   -0.73979548    1.43184405""")])
-        cls.rxn_2.determine_family(rmg_database=cls.rmgdb)
+        cls.rxn_2.determine_family(rmgdb=cls.rmgdb)
 
EOF
@@ -100,3 +100,3 @@
H 0.27058353 -0.73979548 1.43184405""")])
cls.rxn_2.determine_family(rmg_database=cls.rmgdb)
cls.rxn_2.determine_family(rmgdb=cls.rmgdb)

Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant