Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JaGeo committed Nov 24, 2017
1 parent e155634 commit bad3088
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions ContributionsOfAtomsToModes/ContributionsOfAtomsToModes.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ def __init__(self,PoscarName='POSCAR',ForceConstants=False,ForceFileName='FORCE_



def show_primitivecell(self):
def show_primitivecell(self):
"""
shows primitive cell used for the plots and evalualtions on screen
"""
print(self.__phonon.get_primitive())

def __set_ForcesSets(self,filename,phonon):
Expand Down Expand Up @@ -187,7 +190,7 @@ def write_file(self,filename="Contributions.txt"):
args:
filename (string): filename
filename (str): filename
"""
file = open(filename, 'w')
file.write('Frequency Contributions \n')
Expand All @@ -207,14 +210,14 @@ def plot(self,atomgroups,colorofgroups,legendforgroups,freqstart=[],freqend=[],f
args:
atomgroups (list of list of ints): list that groups atoms, atom numbers start at 1
colorofgroups (list of strings): list that matches a color to each group of atoms
legendforgroups (list of strings): list that gives a legend for each group of atoms
colorofgroups (list of str): list that matches a color to each group of atoms
legendforgroups (list of str): list that gives a legend for each group of atoms
freqstart (float): min frequency of plot in cm-1
freqend (float): max frequency of plot in cm-1
freqlist (list of int): list of frequencies that will be plotted; if no list is given all frequencies in the range from freqstart to freqend are plotted, list begins at 1
labelsforfreq (list of strings): list of labels (string) for each frequency
filename (string): filename for the plot
transmode (boolean): if transmode is true than translational modes are shown
labelsforfreq (list of str): list of labels (str) for each frequency
filename (str): filename for the plot
transmodes (boolean): if transmode is true than translational modes are shown
"""

p={}
Expand Down Expand Up @@ -256,13 +259,13 @@ def _plot(self,atomgroups,colorofgroups,legendforgroups,freqstart=[],freqend=[],
args:
atomgroups (list of list of ints): list that groups atoms, atom numbers start at 1
colorofgroups (list of strings): list that matches a color to each group of atoms
legendforgroups (list of strings): list that gives a legend for each group of atoms
colorofgroups (list of str): list that matches a color to each group of atoms
legendforgroups (list of str): list that gives a legend for each group of atoms
freqstart (float): min frequency of plot in cm-1
freqend (float): max frequency of plot in cm-1
freqlist (list of int): list of frequencies that will be plotted; this freqlist starts at 0
labelsforfreq (list of strings): list of labels (string) for each frequency
filename (string): filename for the plot
labelsforfreq (list of str): list of labels (str) for each frequency
filename (str): filename for the plot
"""
#setting of some parameters in matplotlib: http://matplotlib.org/users/customizing.html
mpl.rcParams["savefig.directory"] = os.chdir(os.getcwd())
Expand Down Expand Up @@ -353,11 +356,11 @@ def plot_irred(self,atomgroups,colorofgroups,legendforgroups,transmodes=False,ir
Plots contributions of atoms/several atoms to modes with certain irreducible representations (selected by Mulliken symbol)
args:
atomgroups (list of list of ints): list that groups atoms, atom numbers start at 1
colorofgroups (list of strings): list that matches a color to each group of atoms
legendforgroups (list of strings): list that gives a legend for each group of atoms
colorofgroups (list of str): list that matches a color to each group of atoms
legendforgroups (list of str): list that gives a legend for each group of atoms
transmodes (boolean): translational modes are included if true
irreps (list of strings): list that includes the irreducible modes that are plotted
filename (string): filename for the plot
irreps (list of str): list that includes the irreducible modes that are plotted
filename (str): filename for the plot
"""


Expand Down

0 comments on commit bad3088

Please sign in to comment.