pymatgen | Python Materials Genomics | Dataset library

 by   materialsproject Python Version: 2024.4.13 License: Non-SPDX

kandi X-RAY | pymatgen Summary

kandi X-RAY | pymatgen Summary

pymatgen is a Python library typically used in Artificial Intelligence, Dataset applications. pymatgen has no bugs, it has no vulnerabilities, it has build file available and it has high support. However pymatgen has a Non-SPDX License. You can install using 'pip install pymatgen' or download it from GitHub, PyPI.

Python Materials Genomics (pymatgen) is a robust materials analysis code that defines classes for structures and molecules with support for many electronic structure codes. It powers the Materials Project.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pymatgen has a highly active ecosystem.
              It has 1104 star(s) with 737 fork(s). There are 114 watchers for this library.
              There were 10 major release(s) in the last 6 months.
              There are 191 open issues and 836 have been closed. On average issues are closed in 522 days. There are 18 open pull requests and 0 closed requests.
              OutlinedDot
              It has a negative sentiment in the developer community.
              The latest version of pymatgen is 2024.4.13

            kandi-Quality Quality

              pymatgen has no bugs reported.

            kandi-Security Security

              pymatgen has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              pymatgen has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              pymatgen releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pymatgen
            Get all kandi verified functions for this library.

            pymatgen Key Features

            No Key Features are available at this moment for pymatgen.

            pymatgen Examples and Code Snippets

            Overview
            Pythondot img1Lines of Code : 25dot img1License : Weak Copyleft (LGPL-3.0)
            copy iconCopy
            from gaspy.tasks import schedule_tasks
            from gaspy.gasdb import get_catalog_docs
            from gaspy.tasks.metadata_calculators import CalculateAdsorptionEnergy
            
            
            # Get all of the sites that we have enumerated
            all_site_documents = get_catalog_docs()
            
            # Pick th  
            Using MPmorph,Customizing runs,Examples:
            Pythondot img2Lines of Code : 22dot img2License : Non-SPDX (NOASSERTION)
            copy iconCopy
            from mpmorph.runners.amorphous_maker import get_random_packed
            from mpmorph.workflows.converge import get_converge_wf
            from fireworks import LaunchPad
            
            structure = get_random_packed('Li', target_atoms=100)
            
            spawner_args = {'rescale_params': {'beta': 5e  
            Using MPmorph
            Pythondot img3Lines of Code : 22dot img3License : Non-SPDX (NOASSERTION)
            copy iconCopy
            from mpmorph.workflows.converge import get_converge_wf
            from pymatgen import MPRester
            from fireworks import LaunchPad
            
            mpr = MPRester()
            structure = mpr.get_structure_by_material_id('mp-1143')
            structure.make_supercell([3, 3, 3])
            
            wf = get_converge_wf(s  

            Community Discussions

            QUESTION

            which() command can find executable only with ./
            Asked 2020-May-08 at 23:56

            I'm using pymatgen, which has a class BaderAnalysis (https://github.com/materialsproject/pymatgen/blob/v2020.4.29/pymatgen/command_line/bader_caller.py). This class needs a executable called bader (binary from another source), so it checks if the file is there or not using which(). I do have the file and i can run the bader program manually, but I always get the error that the file isn't there. If I try the which() command manually it turns out that it only finds it with the prefix ./

            ...

            ANSWER

            Answered 2020-May-08 at 23:56

            You would need to add your current directory to your PATH environment variable. You can do it in your program invocation. E.g.,

            Source https://stackoverflow.com/questions/61689931

            QUESTION

            command line utility of pymatgen
            Asked 2020-Mar-21 at 13:46

            I have installed the python package pymatgen and it perfectly works when I use it in my Jupyter notebooks. However, now I wanted to do the POSCAR setup as specified here: https://pymatgen.org/installation.html But when I run: pmg config -p (with my directories) in my command line (Linux), it can't find it and I get the error:

            ...

            ANSWER

            Answered 2020-Mar-21 at 13:46

            The issue was indeed that I was using the wrong python version to run the pmg-script (It was a work computer with many different python versions and I was using python 3.7.6 but there was an old python 2.7 set as default which was used when jus ran "python pmg"). I ran conda activate base in my /home/username/anaconda3 and then python pmg etc. and it worked.

            Source https://stackoverflow.com/questions/60775277

            QUESTION

            Conda Conflicts Not Resolving After Installing Packages
            Asked 2019-Nov-12 at 05:13

            I am attempting to install a package called Symtopo which is a Conda package from owner materiae. The package has dependencies and when I run conda install on it, it results in this error (my current Conda environment is running Python 3.7.4):

            ...

            ANSWER

            Answered 2019-Nov-12 at 05:13
            Suspected Cause

            Judging from your build IDs, you're working with an osx-64 platform. The dependency requirements for SymTopo look weird for all the osx-64 builds, specifically, they require pymatgen=2019.4.11.*, which from searching Anaconda Cloud just doesn't exist. In the linux-64 builds, however, this requirement is pymatgen>=2019.4.11, so I'm thinking the author has done this incorrectly, hence why you can't resolve a coherent package configuration.

            Possible Workarounds

            Other than contacting the author and asking them to post some working builds, I think you have two possible courses of action:

            1. Force Install
            2. Using PyPI Builds

            Either way, assume the resulting env will be fragile, so try to avoid any further unnecessary installations into it.

            Force Install

            If we assume that the pymatgen=2019.4.11.* really should be pymatgen>=2019.4.11 then you could just install all the prereqs (see YAML in next section), then use

            Source https://stackoverflow.com/questions/58797363

            QUESTION

            Pymatgen: How to convert query result to structure
            Asked 2019-Oct-15 at 08:34

            We have existing code to get some material properties for many materials (>60,000).

            ...

            ANSWER

            Answered 2019-Oct-15 at 08:34

            You don't need to query for each individual mpid. Your first code block already queries for the "cif" information of all the materials!

            All you need to do is to convert the cif strings to structures using PyMatGen:

            Source https://stackoverflow.com/questions/58304957

            QUESTION

            Python: how to get the associated value in a string?
            Asked 2019-Mar-01 at 09:38

            sys.stdout.write("metadata-structure: %s\n"%(metadatastructure))

            gives

            ...

            ANSWER

            Answered 2019-Mar-01 at 09:38

            You can use a regular expression to look for _cell_length_a (or any other key), followed by some spaces, and then capture whatever comes after that until the end of that line.

            Source https://stackoverflow.com/questions/54882480

            QUESTION

            What Does the coordinate list next to the cartesian coordinates of an atom represent in neighbor_list
            Asked 2019-Jan-25 at 20:55

            I was trying to analyze the result obtained by using pymatgen.analysis.local_env module by using min_dist approach by using following script:

            ...

            ANSWER

            Answered 2019-Jan-25 at 17:03

            The second set of co-ordinates in square brackets are the fractional co-ordinates of that site with respect to the Structure's Lattice. Fractional co-ordinates wrap around periodic boundaries, so:

            [-0.3863, -0.2759, 1.3863]

            is equivalent to these co-ordinates in the [0,1) range:

            [0.6137, 0.7241, 0.3863]

            For technical reasons, fractional co-ordinates are not wrapped to [0, 1) by default however, since this information is meaningful for some simulation code. For practical purposes however, the easiest way to interpret them is in the [0, 1) range.

            Source https://stackoverflow.com/questions/54356049

            QUESTION

            use string content as variable - python
            Asked 2018-Oct-29 at 18:13

            I am using a package that has operations inside the class (? not sure what either is really), and normally the data is called this way data[package.operation]. Since I have to do multiple operations thought of shortening it and do the following

            ...

            ANSWER

            Answered 2018-Oct-29 at 18:13

            You can use getattr in order to dynamically select attributes from objects (the Orbital package in your case; for example getattr(Orbital, 's')).

            So your loop would be rewritten to:

            Source https://stackoverflow.com/questions/42515378

            QUESTION

            Converting a primitive structure to conventional standard with pymatgen?
            Asked 2017-Oct-05 at 21:51

            How do I convert a primitive structure to the conventional standard representation with pymatgen?

            ...

            ANSWER

            Answered 2017-Oct-05 at 21:51

            To do this, use the SpacegroupAnalyzer object.

            Source https://stackoverflow.com/questions/46595305

            QUESTION

            How to get all bond angles within a structure, using pymatgen?
            Asked 2017-Feb-15 at 02:35

            So, using pymatgen, I have a structure object. What I want to do is get all of the bond angles within the structure. I could loop over every atom to get all bond angles, but this would include every atom, regardless of how far apart they are, which of course is a problem.

            Now, I can find the neighbors of each central atom using the "get_neighbors" function, however, I'm not sure where to go from here, especially because the "get_angle" function takes integer values and not atomic site objects.

            Below is the code I have thus far:

            ...

            ANSWER

            Answered 2017-Feb-15 at 02:35

            Update:

            So, I've figured out a way of doing this. I actually converted each neighboring atom into their Cartesian coordinates. Then, I subtracted the coordinates of the central atom to which the neighboring atoms are attached. Lastly, I found the angles by calculating the dot product of each two vectors divided by the product of their magnitudes, then taking the arc cosine of these values. The code which I used is below. This may not be the most elegant way of doing things, but it does get the job done. If anyone has improvements, feel free to comment.

            Source https://stackoverflow.com/questions/42179261

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pymatgen

            You can install using 'pip install pymatgen' or download it from GitHub, PyPI.
            You can use pymatgen like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install pymatgen

          • CLONE
          • HTTPS

            https://github.com/materialsproject/pymatgen.git

          • CLI

            gh repo clone materialsproject/pymatgen

          • sshUrl

            git@github.com:materialsproject/pymatgen.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Dataset Libraries

            datasets

            by huggingface

            gods

            by emirpasic

            covid19india-react

            by covid19india

            doccano

            by doccano

            Try Top Libraries by materialsproject

            fireworks

            by materialsprojectPython

            crystaltoolkit

            by materialsprojectPython

            mapidoc

            by materialsprojectJupyter Notebook

            workshop

            by materialsprojectJupyter Notebook

            atomate2

            by materialsprojectPython