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

Updated site fingerprints #136

Merged
merged 16 commits into from
Feb 14, 2018
Merged

Conversation

nisse3000
Copy link
Collaborator

  • Incorporated new and optimized OPs.
  • Added unit tests for CrystalSiteFingerprint.
  • Got rid of long if-elif blocks in some presets that use NearNeighbor classes.
  • Added maximum_distance_factor in ChemEnvFingerprint, which is hoped to speed up computations.
  • Updated pymatgen requirements.

@nisse3000 nisse3000 mentioned this pull request Feb 13, 2018
@nisse3000
Copy link
Collaborator Author

@computron, any suggestions/comments/criticism regarding this PR?

@computron
Copy link
Contributor

Right now it conflicts with the main branch

Haven't had time to look at it yet (submitted <1 day ago) - do you need it merged right away? If so I can look at it after the conflicts are resolved, just let me know

@nisse3000
Copy link
Collaborator Author

@computron, it didn't conflict yesterday... Sorry. Will work on the conflicts.

@computron
Copy link
Contributor

(let me know when ready for review)

@nisse3000
Copy link
Collaborator Author

@computron, the tests passed. Have a look if you have time. It's not super urgent. It's only that I did the pull request yesterday before someone made changes to site.py that caused the conflicts.

with open(os.path.join(os.path.dirname(
pymatgen.analysis.__file__), 'cn_opt_paras.yaml'), 'r') as f:
cn_motif_op_paras = yaml.safe_load(f)
f.close()
Copy link
Contributor

Choose a reason for hiding this comment

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

if you use with open(), you don't need to do f.close() (that's the primary point of using with open() instead f.open())

@@ -33,6 +36,18 @@

from matminer.featurizers.stats import PropertyStats

cn_motif_op_paras = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

note that we usually abbreviate as params rather than paras. Params is used >1200 times in the various repos, paras is used ~125 times, mostly by the local env code

@@ -172,38 +186,28 @@ class OPSiteFingerprint(BaseFeaturizer):
default: True).
"""

def __init__(self, optypes=None, dr=0.1, ddr=0.01, ndr=1, dop=0.001,
def __init__(self, targets=None, dr=0.1, ddr=0.01, ndr=1, dop=0.001,
Copy link
Contributor

Choose a reason for hiding this comment

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

We often use targets to mean target elements to bond to, e.g. the some of the NN codes do this. Maybe target_motifs?

@computron
Copy link
Contributor

I put some minor comments, mainly related to naming

@nisse3000
Copy link
Collaborator Author

The only thing I didn't change (yet) is the file name from cn_opt_paras.yaml to cn_opt_params.yaml because that needs to be done in a pymatgen clean up.

@computron
Copy link
Contributor

Thanks!

@computron computron merged commit ae587aa into hackingmaterials:master Feb 14, 2018
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.

None yet

2 participants