qmmd.qmcalc.visAnalysis.energyLeveller ====================================== .. py:module:: qmmd.qmcalc.visAnalysis.energyLeveller .. autoapi-nested-parse:: Energy Leveller version 2.0 (2019) This code is shared under the MIT license Copyright 2019 James Furness. Classes ------- .. autoapisummary:: qmmd.qmcalc.visAnalysis.energyLeveller.State qmmd.qmcalc.visAnalysis.energyLeveller.Diagram Functions --------- .. autoapisummary:: qmmd.qmcalc.visAnalysis.energyLeveller.ReadInput qmmd.qmcalc.visAnalysis.energyLeveller.MakeExampleFile qmmd.qmcalc.visAnalysis.energyLeveller.main Module Contents --------------- .. py:class:: State Holds values for a single state in the energy level diagram. .. py:attribute:: name :type: str :value: '' .. py:attribute:: color :type: str :value: '' .. py:attribute:: labelColor :type: str :value: '' .. py:attribute:: linksTo :type: str :value: '' .. py:attribute:: label :type: str :value: '' .. py:attribute:: legend :type: Optional[str] :value: None .. py:attribute:: energy :type: float :value: 0.0 .. py:attribute:: normalisedPosition :type: float :value: 0.0 .. py:attribute:: column :type: int :value: 1 .. py:attribute:: leftPointx :type: float :value: 0.0 .. py:attribute:: leftPointy :type: float :value: 0.0 .. py:attribute:: rightPointx :type: float :value: 0.0 .. py:attribute:: rightPointy :type: float :value: 0.0 .. py:attribute:: labelOffset :type: Tuple[float, float] :value: (0.0, 0.0) .. py:attribute:: textOffset :type: Tuple[float, float] :value: (0.0, 0.0) .. py:class:: Diagram(width: float, height: float, fontSize: int, outputName: str) Holds global values for the diagram and handles drawing through Draw() method. .. py:attribute:: statesList :type: Dict[str, State] .. py:attribute:: dashes :type: List[float] :value: [6.0, 3.0] .. py:attribute:: outputName :type: str :value: '' .. py:attribute:: columns :type: int :value: 0 .. py:attribute:: width :type: float :value: 0.0 .. py:attribute:: height :type: float :value: 0.0 .. py:attribute:: energyUnits :type: str :value: '' .. py:attribute:: do_legend :type: bool :value: False .. py:attribute:: COLORS :type: Dict[str, str] .. py:attribute:: fig .. py:attribute:: ax .. py:method:: AddState(state: State) -> None Add a state to the diagram. .. py:method:: DetermineEnergyRange() -> List[float] Determine the range of energies in the diagram. .. py:method:: MakeLeftRightPoints() -> None Calculate the left and right points for each state. .. py:method:: Draw() -> None Draw the energy level diagram. .. py:function:: ReadInput(filename: str) -> Diagram Read input from a file and return a Diagram object. .. py:function:: MakeExampleFile() -> None Create an example input file. .. py:function:: main(inp_path: str) -> None Main function to run the energy leveller.