Code Monkey home page Code Monkey logo

interphon's People

Contributors

inwonyeu 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

Watchers

 avatar

interphon's Issues

Incorrect behavior in during sequential PreProcess initialization

Dear In Won Yeu,

During the use of your software I faced with another problem. If I try to sequentially initialize two instances of PreProcess with different POSCARS that have different number of atoms, I get the following error:

ValueError Traceback (most recent call last)
Input In [3], in <cell line: 15>()
13 pre.set_user_arg(user_args)
14 pre.set_unit_cell(path_us_2)
---> 15 pre.set_super_cell(path_ss_2)

File ~\PycharmProjects\interphon\InterPhon\core\pre_process.py:109, in PreProcess.set_super_cell(self, out_file, comment, write_file, code_name)
93 def set_super_cell(self, out_file: FilePath,
94 comment: str = 'Supercell',
95 write_file: bool = True,
96 code_name: str = 'vasp') -> File:
97 """
98 Set a SuperCell instance from the information stored in its UnitCell and UserArgument instances.
99
(...)
107 :type code_name: str
108 """
--> 109 self.super_cell.set_super_cell(self.unit_cell, self.user_arg)
110 self.super_cell.set_super_ind_true(self.unit_cell, self.user_arg)
111 if write_file is True:

File ~\PycharmProjects\interphon\InterPhon\core\super_cell.py:72, in SuperCell.set_super_cell(self, unit_cell, user_arg)
69 if value:
70 _enlarge = _enlarge * user_arg.enlargement[ind]
---> 72 self.atom_type = []
73 for atom_type in unit_cell.atom_type:
74 self.atom_type.extend([atom_type for _ in range(_enlarge)])

File ~\PycharmProjects\interphon\InterPhon\core\unit_cell.py:119, in UnitCell.atom_type(self, _atom_type)
117 self.__atom_type = _atom_type
118 else:
--> 119 raise ValueError("The length of atom_type should be the total number of atoms")

ValueError: The length of atom_type should be the total number of atoms

How to reproduce:

Just run the following code where (path_us_1, path_ss_1) and (path_us_2, path_ss_2) are the paths to the Unitcell/Supercell having different number of atoms. I used a Jupyter Notebook, python 3.9.

from InterPhon.core import PreProcess

user_args = {'dft_code': 'vasp',
'displacement': 0.05,
'enlargement': "1 1 1",
'periodicity': "1 1 0"}

pre = PreProcess()
pre.set_user_arg(user_args)
pre.set_unit_cell(path_us_1)
pre.set_super_cell(path_ss_1)

pre = PreProcess()
pre.set_user_arg(user_args)
pre.set_unit_cell(path_us_1)
pre.set_super_cell(path_ss_2)

periodic system

Hallo,

THank you for providing the code. Is there in future a plan to release for 3D system. When I do for bulk system it says it has not been implemented.

Also, one question in this code at T=0 the code calculates ZPE. Is that right? ZPE= 1/2 * h_bar * (sum over all positive frequencies))

Thanks,
Asif

Incorrect behavior with any periodicity except (1, 1, 0)

Dear In Won Yeu,

If I try to create POSCAR files with atom displacements with any 'periodicity' tag except '1 1 0' (for instance, '1 1 1') the program fails with an error:

File InterPhon\core\pre_process.py:139, in PreProcess.write_displace_cell(self, out_file, code_name, sym_flag)
137 if sym_flag:
138 self.sym = Symmetry2D(self.unit_cell, self.super_cell, self.user_arg)
--> 139 _, _, _ = self.sym.search_point_group()
140 except error.Cannot_Search_Point_Group as e:
141 print("look-up table: ", e.value)

File InterPhon\util\symmetry.py:151, in Symmetry2D.search_point_group(self)
149 rot_ind = []
150 for ind, rot in enumerate(W_candidate):
--> 151 G_rotate = np.dot(np.transpose(rot), np.dot(G_metric, rot))
152 if np.allclose(G_metric, G_rotate, atol=1e-06):
153 rot_ind.append(ind)

File <array_function internals>:180, in dot(*args, **kwargs)

ValueError: shapes (3,3) and (2,2) not aligned: 3 (dim 1) != 2 (dim 0)

Is it expected that InterPhon can operate only with 2D PBC?

Thank you in advance.

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.