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

Discretize a continuous space #84

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

Discretize a continuous space #84

wants to merge 3 commits into from

Conversation

geemi725
Copy link
Contributor

No description provided.

@github-actions
Copy link

1.9.6
No protein molecules found in file: data/hydrophobic_res/e22g.pdb
1.9.6
There is only one chain in the pdb file
1.9.6
1.9.6
No protein molecules found
2.0.0
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6

Test Report

Global Parameters

  • Engine = openai
  • n = 5

Results

Test Run 0 Run 1 Run 2 Run 3 Run 4
cubes Pass Pass Fail Fail Pass
derivative1d-ch Fail Fail Fail Fail Pass
derivative_2deg Fail Pass Fail Fail Fail
dipole Fail Fail Fail Fail Fail
discretize Fail Fail Fail Fail Fail
hydrophobic_res Fail Fail Fail Fail Fail
integral Fail Fail Fail Fail Fail
trap Pass Fail Pass Pass Pass
invert_matrix Fail Fail Fail Pass Pass
mape Pass Fail Fail Fail Fail
mapping_operator Fail Fail Fail Fail Fail
matrix_factorial Fail Fail Fail Fail Fail
pair_wise Fail Fail Fail Fail Fail
pi Pass Fail Fail Fail Fail
random_walk Fail Fail Fail Fail Fail
remove-water-ch Fail Fail Fail Fail Fail
remove-water Fail Fail Fail Fail Fail
rmse-ch Pass Pass Pass Pass Pass
rmse Pass Pass Pass Pass Pass
rog Pass Fail Fail Fail Fail
select_frames Fail Pass Pass Pass Pass
sequence Fail Pass Pass Pass Pass
smoke Pass Pass Pass Pass Pass

Test Details

cubes
derivative1d-ch
derivative_2deg
dipole

Exception on response 1

non-broadcastable output operand with shape (3,1) doesn't match the broadcast shape (3,3)

Exception on response 2

unsupported operand type(s) for -: 'float' and 'NoneType'

Exception on response 3

unsupported operand type(s) for -: 'float' and 'NoneType'

Exception on response 4

unsupported operand type(s) for -: 'float' and 'NoneType'
discretize

Exception on response 0

list indices must be integers or slices, not tuple

Exception on response 1

list indices must be integers or slices, not tuple

Exception on response 2

list indices must be integers or slices, not tuple

Exception on response 3

list indices must be integers or slices, not tuple

Exception on response 4

list indices must be integers or slices, not float
hydrophobic_res

Exception on response 3

invalid syntax (<string>, line 23)
integral
trap

Exception on response 1

invalid syntax (<string>, line 19)
invert_matrix

Exception on response 1

invalid syntax (<string>, line 23)
mape
mapping_operator

Exception on response 0

invalid syntax (<string>, line 19)

Exception on response 1

invalid syntax (<string>, line 20)

Exception on response 2

invalid syntax (<string>, line 19)

Exception on response 3

[Errno 2] No such file or directory: 'water.gro'

Exception on response 4

invalid syntax (<string>, line 19)
matrix_factorial

Exception on response 0

only integer scalar arrays can be converted to a scalar index

Exception on response 1

The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Exception on response 4

EOF while scanning triple-quoted string literal (<string>, line 31)
pair_wise

Exception on response 0

unsupported operand type(s) for /: 'NoneType' and 'int'

Exception on response 1

invalid syntax (<string>, line 23)

Exception on response 2

unsupported operand type(s) for /: 'NoneType' and 'int'

Exception on response 3

name 'alpha_carbon_coord' is not defined

Exception on response 4

invalid syntax (<string>, line 23)
pi

Exception on response 1

unsupported operand type(s) for -: 'NoneType' and 'float'

Exception on response 2

unsupported operand type(s) for -: 'NoneType' and 'float'

Exception on response 3

unsupported operand type(s) for -: 'NoneType' and 'float'

Exception on response 4

unsupported operand type(s) for -: 'NoneType' and 'float'
random_walk

Exception on response 0

unsupported operand type(s) for *: 'NoneType' and 'NoneType'

Exception on response 1

expected an indented block (<string>, line 22)

Exception on response 2

unsupported operand type(s) for *: 'NoneType' and 'NoneType'

Exception on response 3

invalid syntax (<string>, line 21)
remove-water-ch

Exception on response 0

'NoneType' object has no attribute 'n_atoms'

Exception on response 1

'NoneType' object has no attribute 'n_atoms'

Exception on response 2

'NoneType' object has no attribute 'n_atoms'

Exception on response 3

'NoneType' object has no attribute 'n_atoms'

Exception on response 4

'Trajectory' object has no attribute 'rest'
remove-water

Exception on response 0

invalid syntax (<string>, line 20)

Exception on response 1

'NoneType' object has no attribute 'n_atoms'

Exception on response 2

'NoneType' object has no attribute 'n_atoms'

Exception on response 3

'NoneType' object has no attribute 'n_atoms'

Exception on response 4

invalid syntax (<string>, line 18)
rmse-ch
rmse
rog

Exception on response 1

name 'radius_of_gy' is not defined

Exception on response 2

name 'radius' is not defined

Exception on response 3

name 'radius' is not defined

Exception on response 4

name 'radius' is not defined
select_frames

Exception on response 0

invalid syntax (<string>, line 20)
sequence
smoke

@github-actions
Copy link

1.9.6
No protein molecules found
1.9.6
1.9.6
No protein molecules found
[[1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
[1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
[1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
[1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
[1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]]
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6
1.9.6

Test Report

Global Parameters

  • Engine = openai
  • n = 5

Results

Test Run 0 Run 1 Run 2 Run 3 Run 4
cubes Pass Pass Pass Pass Pass
derivative1d-ch Fail Fail Fail Fail Fail
derivative_2deg Fail Fail Fail Fail Fail
dipole Fail Fail Fail Fail Fail
discretize Fail Fail Fail Fail Fail
hydrophobic_res Fail Fail Fail Fail Fail
integral Fail Fail Fail Fail Fail
trap Pass Pass Pass Pass Pass
invert_matrix Pass Fail Fail Fail Fail
mape Fail Fail Pass Fail Fail
mapping_operator Fail Fail Fail Fail Fail
matrix_factorial Fail Fail Fail Fail Fail
pair_wise Fail Fail Fail Fail Fail
pi Pass Fail Pass Pass Pass
random_walk Fail Fail Pass Fail Fail
remove-water-ch Fail Fail Fail Fail Fail
remove-water Fail Fail Fail Fail Pass
rmse-ch Pass Pass Pass Pass Pass
rmse Pass Pass Pass Pass Pass
rog Fail Fail Fail Pass Pass
select_frames Pass Pass Pass Pass Pass
sequence Fail Fail Fail Pass Pass
smoke Pass Pass Pass Pass Pass

Test Details

cubes
derivative1d-ch

Exception on response 3

invalid syntax (<string>, line 21)
derivative_2deg
dipole

Exception on response 0

unsupported operand type(s) for -: 'float' and 'NoneType'

Exception on response 1

unsupported operand type(s) for -: 'float' and 'NoneType'

Exception on response 2

unsupported operand type(s) for -: 'float' and 'NoneType'

Exception on response 3

unsupported operand type(s) for -: 'float' and 'NoneType'

Exception on response 4

unsupported operand type(s) for -: 'float' and 'NoneType'
discretize

Exception on response 0

invalid syntax (<string>, line 18)

Exception on response 1

can't multiply sequence by non-int of type 'float'

Exception on response 2

unsupported operand type(s) for /: 'float' and 'list'

Exception on response 3

unsupported operand type(s) for /: 'float' and 'list'

Exception on response 4

invalid syntax (<string>, line 18)
hydrophobic_res

Exception on response 1

invalid syntax (<string>, line 23)

Exception on response 4

invalid syntax (<string>, line 23)
integral
trap
invert_matrix
mape
mapping_operator

Exception on response 0

expected an indented block (<string>, line 19)

Exception on response 1

expected an indented block (<string>, line 21)

Exception on response 2

expected an indented block (<string>, line 20)

Exception on response 3

invalid syntax (<string>, line 19)

Exception on response 4

invalid syntax (<string>, line 18)
matrix_factorial

Exception on response 4

EOF while scanning triple-quoted string literal (<string>, line 31)
pair_wise

Exception on response 0

name 'n' is not defined

Exception on response 1

unsupported operand type(s) for /: 'NoneType' and 'int'

Exception on response 2

name 'itertools' is not defined

Exception on response 3

invalid syntax (<string>, line 22)

Exception on response 4

unsupported operand type(s) for /: 'NoneType' and 'int'
pi

Exception on response 1

unsupported operand type(s) for -: 'NoneType' and 'float'
random_walk

Exception on response 0

unsupported operand type(s) for /: 'float' and 'module'

Exception on response 1

expected an indented block (<string>, line 22)

Exception on response 3

unsupported operand type(s) for *: 'NoneType' and 'NoneType'

Exception on response 4

invalid syntax (<string>, line 21)
remove-water-ch

Exception on response 0

'NoneType' object has no attribute 'n_atoms'

Exception on response 1

'Trajectory' object has no attribute 'atom'

Exception on response 2

'Trajectory' object has no attribute 'rest'

Exception on response 3

EOL while scanning string literal (<string>, line 17)

Exception on response 4

'NoneType' object has no attribute 'n_atoms'
remove-water

Exception on response 0

invalid syntax (<string>, line 20)

Exception on response 1

name 'tra' is not defined

Exception on response 2

'NoneType' object has no attribute 'n_atoms'

Exception on response 3

EOL while scanning string literal (<string>, line 17)
rmse-ch
rmse
rog

Exception on response 0

name 'radius' is not defined

Exception on response 1

name 'radius' is not defined
select_frames
sequence
smoke

import numpy as np

def discretize(location, grid):
return tuple(int(np.digitize(l, g)) for l, g in zip(location, grid))
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Is the grid necessarily to be int? If not, the test is not exhausted. Otherwise should modify the description to specify the grid is int.
  2. Take a look at this https://numpy.org/doc/stable/reference/generated/numpy.digitize.html. Maybe should specify right argument. Consider the edge case that the location falls exactly on grid point, and the grid array is increasing/decreasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants