Skip to content

Commit

Permalink
Updated attack and badges
Browse files Browse the repository at this point in the history
  • Loading branch information
t-young31 committed May 12, 2020
1 parent 658bc27 commit a6dd539
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![DOI](https://zenodo.org/badge/196085570.svg)](https://zenodo.org/badge/latestdoi/196085570) [![Build Status](https://travis-ci.org/duartegroup/autodE.svg?branch=joseph)](https://travis-ci.org/duartegroup/autodE) [![codecov](https://codecov.io/gh/duartegroup/autodE/branch/joseph/graph/badge.svg)](https://codecov.io/gh/duartegroup/autodE/branch/joseph) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![DOI](https://zenodo.org/badge/196085570.svg)](https://zenodo.org/badge/latestdoi/196085570) [![Build Status](https://travis-ci.org/duartegroup/autodE.svg?branch=master)](https://travis-ci.org/duartegroup/autodE) [![codecov](https://codecov.io/gh/duartegroup/autodE/branch/master/graph/badge.svg)](https://codecov.io/gh/duartegroup/autodE/branch/master) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

![alt text](autode/common/llogo.png)
***
Expand Down
3 changes: 1 addition & 2 deletions autode/substitution.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_substitution_centres(reactant, bond_rearrangement, shift_factor):
return subst_centers


def attack_cost(reactant, subst_centres, attacking_mol_idx, a=1.0, b=1.0, c=10.0, d=1.0):
def attack_cost(reactant, subst_centres, attacking_mol_idx, a=1.0, b=1.0, c=1.0, d=10.0):
"""
Calculate the 'attack cost' for a molecule attacking in e.g. a substitution or elimination reaction.
Expand Down Expand Up @@ -145,4 +145,3 @@ def get_cost_rotate_translate(x, reactant, subst_centres, attacking_mol_idx):
moved_reactant.rotate_mol(axis=x[7:10], theta=x[10], mol_index=attacking_mol_idx)

return attack_cost(moved_reactant, subst_centres, attacking_mol_idx)

10 changes: 0 additions & 10 deletions examples/carbonyl/carbonyl.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/test_attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ def test_attack():
cost_trans_rot = get_cost_rotate_translate(x=np.array(x), reactant=reactant, subst_centres=[subst_centre],
attacking_mol_idx=0)

# Requires a=1, b=1, c=10, d=1 in the attack_cost() called by get_cost_rotate_translate()
assert np.abs(cost_trans_rot - 2.919) < 1E-3
# Requires a=1, b=1, c=1, d=10 in the attack_cost() called by get_cost_rotate_translate()
assert np.abs(cost_trans_rot - 3.5072) < 1E-3

0 comments on commit a6dd539

Please sign in to comment.