diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index c55cf367..00000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: 2 - -python: - version: 3.8 - install: - - requirements: docs/requirements.txt - - method: pip - path: . - extra_requirements: - - docs - - method: setuptools - path: . - system_packages: true diff --git a/README.md b/README.md index 768f3e7c..026821fb 100644 --- a/README.md +++ b/README.md @@ -23,4 +23,3 @@ Detailed documentation available at: https://pages.nist.gov/jarvis/ [![image](https://img.shields.io/badge/JARVIS-Figshare-Green.svg)](https://figshare.com/authors/Kamal_Choudhary/4445539) [![image](https://img.shields.io/badge/JARVIS-ToolsDocs-Green.svg)](https://pages.nist.gov/jarvis) [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://github.com/JARVIS-Materials-Design/jarvis-tools-notebooks) - diff --git a/jarvis/__init__.py b/jarvis/__init__.py index a42ca7a8..fc2dbd53 100644 --- a/jarvis/__init__.py +++ b/jarvis/__init__.py @@ -1,5 +1,5 @@ """Version number.""" -__version__ = "2023.08.10" +__version__ = "2023.09.20" import os diff --git a/jarvis/core/atoms.py b/jarvis/core/atoms.py index e88455aa..d626d902 100644 --- a/jarvis/core/atoms.py +++ b/jarvis/core/atoms.py @@ -887,9 +887,7 @@ def atomwise_angle_and_radial_distribution( and nbor_info["dist"][in1][i] * nbor_info["dist"][in2][i] != 0 ] ang_hist, ang_bins = np.histogram( - angles, - bins=np.arange(1, nbins + 2, 1), - density=False, + angles, bins=np.arange(1, nbins + 2, 1), density=False, ) for jj, j in enumerate(angles): actual_pangs[i, jj] = j @@ -944,7 +942,7 @@ def center(self, axis=2, vacuum=18.0, about=None): """ cell = self.lattice_mat p = self.cart_coords - + props = self.props dirs = np.zeros_like(cell) for i in range(3): dirs[i] = np.cross(cell[i - 1], cell[i - 2]) @@ -998,6 +996,7 @@ def center(self, axis=2, vacuum=18.0, about=None): elements=self.elements, coords=new_coords, cartesian=True, + props=props, ) return atoms @@ -1066,6 +1065,7 @@ def center_around_origin(self, new_origin=[0.0, 0.0, 0.5]): lat = self.lattice_mat typ_sp = self.elements natoms = self.num_atoms + props = self.props # abc = self.lattice.lat_lengths() COM = self.get_origin() # COM = self.get_center_of_mass() @@ -1080,7 +1080,11 @@ def center_around_origin(self, new_origin=[0.0, 0.0, 0.5]): z[i] = self.frac_coords[i][2] - COM[2] + new_origin[2] coords.append([x[i], y[i], z[i]]) struct = Atoms( - lattice_mat=lat, elements=typ_sp, coords=coords, cartesian=False + lattice_mat=lat, + elements=typ_sp, + coords=coords, + cartesian=False, + props=props, ) return struct @@ -1604,7 +1608,9 @@ def fix_pbc(atoms): ) -def add_atoms(top, bottom, distance=[0, 0, 1], apply_strain=False): +def add_atoms( + top, bottom, distance=[0, 0, 1], apply_strain=False, add_tags=True +): """ Add top and bottom Atoms with a distance array. @@ -1623,10 +1629,12 @@ def add_atoms(top, bottom, distance=[0, 0, 1], apply_strain=False): # print("strain_x,strain_y", strain_x, strain_y) elements = [] coords = [] + props = [] lattice_mat = bottom.lattice_mat for i, j in zip(bottom.elements, bottom.frac_coords): elements.append(i) coords.append(j) + props.append("bottom") top_cart_coords = lattice_coords_transformer( new_lattice_mat=top.lattice_mat, old_lattice_mat=bottom.lattice_mat, @@ -1636,6 +1644,7 @@ def add_atoms(top, bottom, distance=[0, 0, 1], apply_strain=False): for i, j in zip(top.elements, top_frac_coords): elements.append(i) coords.append(j) + props.append("top") order = np.argsort(np.array(elements)) elements = np.array(elements)[order] @@ -1651,8 +1660,10 @@ def add_atoms(top, bottom, distance=[0, 0, 1], apply_strain=False): lattice_mat=lattice_mat, coords=coords, elements=elements, + props=props, cartesian=False, ).center_around_origin() + # print('combined props',combined) return combined diff --git a/setup.py b/setup.py index 8586281c..402f29ec 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name="jarvis-tools", - version="2023.08.10", + version="2023.09.20", long_description=long_d, install_requires=[ "numpy>=1.20.1",