diff --git a/tests/integration/run_align b/tests/integration/run_align new file mode 100755 index 0000000..ed665e0 --- /dev/null +++ b/tests/integration/run_align @@ -0,0 +1,3 @@ +#!/bin/bash + +./multishift align diff --git a/tests/integration/run_translate b/tests/integration/run_translate new file mode 100755 index 0000000..f21eb1d --- /dev/null +++ b/tests/integration/run_translate @@ -0,0 +1,3 @@ +#!/bin/bash + +./multishift translate -s settings.json diff --git a/tests/projects/Al-mush/al.vasp b/tests/projects/Al-mush/al.vasp deleted file mode 100644 index 0dd6621..0000000 --- a/tests/projects/Al-mush/al.vasp +++ /dev/null @@ -1,9 +0,0 @@ -Al1 -1.0 - 2.8559546471 0.0000000000 0.0000000000 - 1.4279773235 2.4733292764 0.0000000000 - 1.4279773235 0.8244430921 2.3318772046 - Al - 1 -Direct - 0.000000000 0.000000000 0.000000000 diff --git a/tests/projects/Al-mush/symplot.py b/tests/projects/Al-mush/symplot.py deleted file mode 100644 index 372a12c..0000000 --- a/tests/projects/Al-mush/symplot.py +++ /dev/null @@ -1,75 +0,0 @@ -import json -import os -import numpy as np -import pandas as pd -import matplotlib -import matplotlib.pyplot as plt - -font = {'family' : 'normal', - 'size' : 16} - -matplotlib.rc('font', **font) - -def load_record(record_file): - with open(record_file) as f: - records = json.load(f) - return records - -def write_json(data,target_file): - with open(target_file,'w') as f: - json.dump(data,f) - return - -def tabulize_record(record): - df=pd.read_json(json.dumps(record["ids"]), orient="index") - return df - -def scatter_equivalent_shifts(ax,record,**kwargs): - unwinded=tabulize_record(record) - - #Find shifts for any cleave entry (if you just ran "shift" you don't need this step) - nocleave=unwinded.loc[unwinded["cleavage"]==unwinded["cleavage"].iloc[0]] - - #Get in plane shift vectors - xy=np.array(nocleave["shift"].to_list()) - ab=np.array(nocleave["grid_point"].to_list()) - #We'll use their equivalent group value to color the plot - c=nocleave["group"].to_numpy() - - #This is all we need, we save it to a single array - points=np.hstack((ab,xy,c[:,np.newaxis])) - - #We'll duplicate the "walls" along a and b onto the next periodic image - a,b=record["grid"] - au,bu=record["shift_units"] - avec,bvec=np.array(au)*a,np.array(bu)*b - - #Get the walls and repeat them on the next boundary - aarg=points[:,1].argsort()[0:a] - awall=points[aarg] - awall[:,[2,3]]+=bvec - points=np.vstack((points,awall)) - - barg=points[:,0].argsort()[0:b+1] - bwall=points[barg] - bwall[:,[2,3]]+=avec - points=np.vstack((points,bwall)) - - #Scatter the grid points, coloring symmetrically equivalent ones with the same value - ax.scatter(points[:,2],points[:,3],c=points[:,4],**kwargs) - - ax.set_aspect('equal') - ax.set_xticks([]) - ax.set_yticks([]) - -def main(): - record=load_record("./record.json") - - fig=plt.figure() - ax=fig.add_subplot(111) - - scatter_equivalent_shifts(ax,record,s=85,cmap=matplotlib.cm.get_cmap("twilight")) - plt.show() - -if __name__ == "__main__": - main()