-
Notifications
You must be signed in to change notification settings - Fork 34
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
pymatgen update, adsorption vector, dockerfile update #92
Conversation
return vector | ||
|
||
def _ang_between_vectors(v1, v2): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need or extra lines between function definition & docstring
@@ -251,6 +252,172 @@ def find_adsorption_sites(atoms): | |||
sites = sites_dict['all'] | |||
return sites | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try to keep two lines between functions
vector[2] = -1.0 | ||
vector /= -np.linalg.norm(vector) | ||
return vector | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 lines between functions
vector = np.array([0., 0., 1.]) | ||
|
||
del slab_atoms[[U_index]] | ||
return vector | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 lines between functions
if elem not in cn_dict.keys(): | ||
cn_dict[elem] = [] | ||
cn = v.get_cn(sym_struct, idx, use_weights=True) | ||
cn = float('%.5f' %(round(cn, 5))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flake8 flag E225: missing whitespace around operator (add space after %)
the surface atoms | ||
''' | ||
struct = AseAtomsAdaptor.get_structure(atoms) | ||
v = VoronoiNN() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single-letter object names are not a good practice. Expand it out to be more descriptive.
# for atoms in each structure. | ||
# for example, Pt[1,1,1] would have cn=3 and cn=12 | ||
# depends on the Pt atom. | ||
v = VoronoiNN() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single-letter object names are not a good practice. Expand it out to be more descriptive.
@@ -42,6 +47,7 @@ | |||
from ..gasdb import get_mongo_collection | |||
from ..mongo import make_atoms_from_doc | |||
from ..tasks.atoms_generators import GenerateBulk | |||
from ..tasks.calculation_finders import FindBulk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import
expected_heights = [6.272210880031006, 6.176446311678471, 4.984647756561888, | ||
5.121238738402999, 4.984647756561888, 6.176446311678471, | ||
6.272210880031005, 6.147996384691849, 4.839115752287323, | ||
4.839115752287323, 6.147996384691849, 6.176446311678471, | ||
3.275555302966866, 4.839115752287323, 4.984647756561887, | ||
3.4354313844223103, 5.021787742477727, 5.121238738402999, | ||
3.275555302966866, 4.839115752287322, 6.14799638469185] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace
2.8129223518338944, | ||
20.895846464363103), | ||
adsorption_site=(1.40646118, | ||
1.40646118, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace
Dockerfile has been updated, which contains a newer version of miniconda (with python 3.6) and several packages updates, the biggest one being pymatgen (2019.12.3 version).
Pymatgen update provides better adsorption sites to our catalog. It also has the new "fast porbaix" algorithm, which makes bulk stability screening faster and can/should be incorporated into GASpy screening in the future.
The addition of the adsorption vector pieces allows us to place adsorbates better. Instead of placing adsorbates normal to the entire slab (default is [0,0,1]), it will figure out the local plane and place adsorbates normal to it.