Giter Site home page Giter Site logo

henniggroup / mpinterfaces Goto Github PK

View Code? Open in Web Editor NEW
68.0 68.0 48.0 71.22 MB

Python package that enables high throughput analysis of interfaces(two dimensional materials, hetero-structures, nanoparticles with and without ligands/solvents).

Home Page: http://henniggroup.github.io/MPInterfaces/

License: MIT License

Python 99.66% Shell 0.34%

mpinterfaces's People

Contributors

as2362 avatar ashtonmv avatar chaitanyaz avatar jasongibsonufl avatar joshgabriel avatar kvs11 avatar matk86 avatar rhennig avatar sevemonahan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpinterfaces's Issues

Missing atom on interface

Hi,
Thank you for the very useful script. I am using your script to match surfaces of periodic systems. I follow the steps like the example in MPInterfaces/examples/hetero_interface.py. For some systems I am missing atoms of the top 2d structure in the interface. Do you know how I can fix this?

calibrate.py creates folder names with spaces

When run_cal is called with is_matrix=false, the folder names extracted from the first line of the POSCAR file contain spaces which not every cluster can handle.

Proposed change: change line 282 from
return val.comment
to
return val.comment.replace(' ','').replace('\t','')
to replaces spaces with underscores.

Can not import pymatgen modules

Hi, I install pymatgen and your code on my MacBook air. Then I ran the create_interface.py in the example file. But it says:

ModuleNotFoundError: No module named 'pymatgen.util.coord_utils'
ImportError: cannot import name 'Structure' from 'pymatgen' (unknown location)

Can you tell me how to solve these problems?
Many thanks!

KeyError:symbols

I try to run the example mentioned in doc : 'mpint -i naf.yaml -t bulk_calibrate run', but get error(KeyError:symbols) in pytmatgen/io/vasp/input.py at line 1742.
Before enter the construction MPINTVaspInputSet(name, self.incar, self.poscar, self.kpoints, self.potcar,self.qadapter, vis_logger=self.logger,euse_path=self.reuse_paths, test=self.test)(in calibrate.py at line 833) , self.potcar has key "symbols". But when self.potcar is passed to this construction MPINTVaspInputSet as argument, it changes. There is no key named "symbols" or "functional", which is needed to generate a potcar.

I'm very confused about this error and I'm looking forward to your answer. Thanks!

MPInterfaces_Latest cannot be installed on Windows 10

Hi. Thanks for the great work on MPInterfaces.

On Windows 10, I got the following error using the command:

pip install MPInterfaces_Latest

  File "C:\ProgramData\miniconda3\lib\distutils\util.py", line 110, in convert_path
    raise ValueError("path '%s' cannot be absolute" % pathname)
ValueError: path '/home/joshua/Software/Current_MPInterfaces/MPInterfaces/mpinterfaces/scripts/__pycache__' cannot be absolute

On the other hand, no error occurs if I use

pip install MPInterfaces

(Successfully installed MPInterfaces-2020.6.19 nose-1.3.7 seaborn-0.11.0)

Cannot read in mpint_config.yaml file

In MPInterfaces/mpinterfaces/init.py, line 25, MPINT_CONFIG failed to load data from mpint_config.yaml. I changed the command to be MPINT_CONFIG = loadfn(os.path.join(os.path.dirname(PACKAGE_PATH),'config_files/mpint_config.yaml')). This fixed a problem in my case.

ValueError: Invalid format: `*****/poscar`

iface_slab.to('poscar', str(min_thick)+'_'+str(min_vac)+'/POSCAR') #Write file

This line of code is not writing POSCAR with Pymatgen, instead throwing an error "ValueError: Invalid format: *****/poscar"

Problem with the Pourbaix diagram

Hello, I am trying to use the example of the Pourbaix diagram generator, and I encounter an error when trying to get the entries for the system:
entries = a.get_entries_in_chemsys(['Fe', 'O', 'H'])

Is there any way I can solve this?

MPRestError                               Traceback (most recent call last)
<ipython-input-16-83bed31b90c0> in <module>
      1 #Entries are the basic unit for thermodynamic and other analyses in pymatgen.
      2 #This gets all entries belonging to the Fe-O-H system.
----> 3 entries = a.get_entries_in_chemsys(['Fe', 'O', 'H'])

/usr/local/lib/python3.8/dist-packages/mp_api/client/mprester.py in get_entries_in_chemsys(self, elements, use_gibbs, compatible_only, inc_structure, property_data, conventional_unit_cell, additional_criteria)
    943 
    944         entries.extend(
--> 945             self.get_entries(
    946                 all_chemsyses,
    947                 compatible_only=compatible_only,

/usr/local/lib/python3.8/dist-packages/mp_api/client/mprester.py in get_entries(self, chemsys_formula_mpids, compatible_only, inc_structure, property_data, conventional_unit_cell, sort_by_e_above_hull, additional_criteria)
    527             )
    528         else:
--> 529             docs = self.thermo.search(
    530                 **input_params,
    531                 all_fields=False,

/usr/local/lib/python3.8/dist-packages/mp_api/client/routes/thermo.py in search(self, chemsys, energy_above_hull, equilibrium_reaction_energy, formation_energy, formula, is_stable, material_ids, num_elements, thermo_ids, thermo_types, total_energy, uncorrected_energy, sort_fields, num_chunks, chunk_size, all_fields, fields)
    142         query_params = {entry: query_params[entry] for entry in query_params if query_params[entry] is not None}
    143 
--> 144         return super()._search(
    145             num_chunks=num_chunks,
    146             chunk_size=chunk_size,

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _search(self, num_chunks, chunk_size, all_fields, fields, **kwargs)
    907         # documented kwargs.
    908 
--> 909         return self._get_all_documents(
    910             kwargs,
    911             all_fields=all_fields,

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _get_all_documents(self, query_params, all_fields, fields, chunk_size, num_chunks)
    956         chosen_param = list_entries[0][0] if len(list_entries) > 0 else None
    957 
--> 958         results = self._query_resource(
    959             query_params,
    960             fields=fields,

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _query_resource(self, criteria, fields, suburl, use_document_model, parallel_param, num_chunks, chunk_size, timeout)
    293                     url += "/"
    294 
--> 295             data = self._submit_requests(
    296                 url=url,
    297                 criteria=criteria,

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _submit_requests(self, url, criteria, use_document_model, parallel_param, num_chunks, chunk_size, timeout)
    427         initial_params_list = [{"url": url, "verify": True, "params": copy(crit)} for crit in new_criteria]
    428 
--> 429         initial_data_tuples = self._multi_thread(use_document_model, initial_params_list)
    430 
    431         for data, subtotal, crit_ind in initial_data_tuples:

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _multi_thread(self, use_document_model, params_list, progress_bar, timeout)
    632                 for future in finished:
    633 
--> 634                     data, subtotal = future.result()
    635 
    636                     if progress_bar is not None:

/usr/lib/python3.8/concurrent/futures/_base.py in result(self, timeout)
    435                     raise CancelledError()
    436                 elif self._state == FINISHED:
--> 437                     return self.__get_result()
    438 
    439                 self._condition.wait(timeout)

/usr/lib/python3.8/concurrent/futures/_base.py in __get_result(self)
    387         if self._exception:
    388             try:
--> 389                 raise self._exception
    390             finally:
    391                 # Break a reference cycle with the exception in self._exception

/usr/lib/python3.8/concurrent/futures/thread.py in run(self)
     55 
     56         try:
---> 57             result = self.fn(*self.args, **self.kwargs)
     58         except BaseException as exc:
     59             self.future.set_exception(exc)

/usr/local/lib/python3.8/dist-packages/mp_api/client/core/client.py in _submit_request_and_process(self, url, verify, params, use_document_model, timeout)
    720                     message = str(data)
    721 
--> 722             raise MPRestError(
    723                 f"REST query returned with error status code {response.status_code} "
    724                 f"on URL {response.url} with message:\n{message}"

MPRestError: REST query returned with error status code 404 on URL https://api.materialsproject.org/thermo/?thermo_types=GGA_GGA%2BU&_fields=entries&chemsys=Fe&_limit=143 with message:
Response {"message":"no Route matched with those values"}

Orthogonal surfaces

Hi there,

Great work on this package.

I was browsing and I saw that you mentioned that ASE supports orthogonal Slabs but pymatgen doesn't. I should let you know that the most recent pymatgen already supports this. There are two options:

  1. Using the max_normal_search option, which will look for c lattice vectors that preserve symmetry and are as normal as possible to the a and b lattice vectors. Orthogonality is not guaranteed, but for many typical high symmetry structures, this works well.
  2. Slab now has a get_orthogonal_c_slab() method (see materialsproject/pymatgen@1cf37e7). This returns a Slab that has the c vector to be exactly orthogonal to the a and b surface vectors. Note that such forcing of orthogonality changes the Slab symmetry, though if your vacuum size is large enough, it usually isn't a problem.

Please update code

Hi developers.
Since pymatgen has changed a lot recently, MPInterfaces based on pymatgen also need to be updated. Could developers please fix errors such as "cannot import name 'Lattice' from 'pymatgen', cannot import name 'Structure' from 'pymatgen', can not import VASP_STD_BIN? We would appreciate it.

GPL license comments

Hi Kiran,

We probably should add the GPL license comments into the source files. I could not find them in the files I looked at. Could you please take care of this.

Thanks,
Richard

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.