Skip to content

Commit

Permalink
Merge pull request #48 from pyscal/update_pyscal3_backend
Browse files Browse the repository at this point in the history
Update pyscal3 backend
  • Loading branch information
srmnitc authored Nov 7, 2023
2 parents 91986aa + af58585 commit 388dc53
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 167 deletions.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
- python >3.8
- pyscal3 =3.1.0
- pyscal3 =3.1.1
- rdflib
- pyyaml
- jupyterlab
Expand Down
10 changes: 2 additions & 8 deletions pyscal_rdf/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,12 @@ def get_angle(vec1, vec2):
return np.round(np.arccos(np.dot(vec1, vec2)/(np.linalg.norm(vec1)*np.linalg.norm(vec2)))*180/np.pi, decimals=2)

def get_coordination(sys):
sys.find_neighbors(method="cutoff")
sys.find.neighbors(method="cutoff")
coordination = [len(x) for x in sys.atoms.neighbors.index]
return coordination

def get_lattice_vector(sys, cartesian=False):
box = [[sys._structure_dict['scaling_factors'][0], 0, 0],
[0, sys._structure_dict['scaling_factors'][1], 0],
[0, 0, sys._structure_dict['scaling_factors'][2]]]
if cartesian:
box[0][0] = box[0][0]*sys.atoms._lattice_constant
box[1][1] = box[1][1]*sys.atoms._lattice_constant
box[2][2] = box[2][2]*sys.atoms._lattice_constant
box = sys.box
return box

def get_bravais_lattice(sys):
Expand Down
Loading

0 comments on commit 388dc53

Please sign in to comment.