Skip to content

Commit

Permalink
Merge pull request #70 from SMTG-Bham/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
kbspooner authored Sep 21, 2023
2 parents d8784e5 + 1022aca commit 4c073a3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
20 changes: 10 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
|____________________________________:_______________________/____________:_____/
.. image:: https://app.travis-ci.com/SMTG-UCL/ThermoParser.svg?branch=master
.. image:: https://app.travis-ci.com/SMTG-bham/ThermoParser.svg?branch=master
:alt: The travis-ci badge
:target: https://app.travis-ci.com/SMTG-UCL/ThermoParser
:target: https://app.travis-ci.com/SMTG-bham/ThermoParser

ThermoParser is a toolkit used to simplify the analysis of data
produced by specialist materials science codes, centred around
Expand All @@ -37,7 +37,7 @@ Click on the image to go to the `gallery`_!
:alt: A phonon dispersion where widened bands show phonon scattering
:target: https://smtg-ucl.github.io/ThermoParser/gallery.html

.. _gallery: https://smtg-ucl.github.io/ThermoParser/gallery.html
.. _gallery: https://smtg-bham.github.io/ThermoParser/gallery.html

Installation
------------
Expand All @@ -46,7 +46,7 @@ ThermoParser can easily be installed with git and pip:

.. code-block:: bash
git clone https://github.com/SMTG-UCL/ThermoParser.git
git clone https://github.com/SMTG-bham/ThermoParser.git
cd ThermoParser
pip install .
Expand All @@ -66,7 +66,7 @@ longer process is required:
2. ``python3 -m pip install cython numpy``
3. ``brew info hdf5`` to retrieve the path to your hdf5 install
4. ``HDF5_DIR=YOUR_HDF5_PATH --no-build-isolation h5py``
5. ``git clone https://github.com/SMTG-UCL/ThermoParser.git``
5. ``git clone https://github.com/SMTG-bham/ThermoParser.git``
6. ``cd ThermoParser``
7. ``pip install --user -e .``

Expand Down Expand Up @@ -107,8 +107,8 @@ The best way to get a feel for ThermoParser is to see it in action:
Take a look at our `examples`_ and `tutorials`_. Currently supported
codes are:

.. _examples: https://github.com/smtg-ucl/ThermoParser/tree/master/examples
.. _tutorials: https://smtg-ucl.github.io/ThermoParser/tutorials.html
.. _examples: https://github.com/smtg-bham/ThermoParser/tree/master/examples
.. _tutorials: https://smtg-bham.github.io/ThermoParser/tutorials.html

* Phononic properties:

Expand Down Expand Up @@ -156,10 +156,10 @@ appropriate `examples`_, further `documentation`_ and `tests`_ are greatly
appreciated. Documentation uses the `sphinx`_ package, and can be built from
the ``docs`` directory with ``sphinx-build -b html src/ .``.

.. _issue tracker: https://github.com/smtg-ucl/ThermoParser/issues
.. _issue tracker: https://github.com/smtg-bham/ThermoParser/issues
.. _fork and pull: https://guides.github.com/activities/forking
.. _documentation: https://smtg-ucl.github.io/ThermoParser/
.. _tests: https://github.com/smtg-ucl/ThermoParser/tree/master/tests
.. _documentation: https://smtg-bham.github.io/ThermoParser/
.. _tests: https://github.com/smtg-bham/ThermoParser/tree/master/tests

Testing
-------
Expand Down
4 changes: 3 additions & 1 deletion tests/test_data/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def test_spin(self):
f['ir_kpoints'] = [[1, 2, 3]]
f['scattering_rates_up'][0,0,1,0,0] = 1
f['scattering_rates_down'][0,0,1,0,0] = 3
f['energies_up'] = np.zeros((1, 2, 2, 3, 1))
f['energies_down'] = np.zeros((1, 2, 2, 3, 1))

data = load.amset_mesh('test.hdf5', 'scattering_rates', spin='avg')
for q2 in ['scattering_rates', 'temperature', 'doping', 'meta']:
Expand Down Expand Up @@ -378,4 +380,4 @@ def test_default(self, mock_load, mock_poscar):

data2 = load.phonopy_dos('mock')
mock_load.assert_called_once()
mock_poscar.assert_called_once()
mock_poscar.assert_called_once()
4 changes: 2 additions & 2 deletions tp/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def get():
show_default=True)
@click.option('-s', '--scattering',
help='Scattering mechanism.',
type=click.Choice(['ADP', 'IMP', 'PIE', 'POP', 'total'],
type=click.Choice(['ADP', 'IMP', 'PIE', 'POP', 'Total'],
case_sensitive=False),
default='total',
show_default=True)
Expand Down Expand Up @@ -272,7 +272,7 @@ def get_amset(amset_file, quantity, dtype, doping, direction, temperature, spin,
@get.command('occupation')
@inputs_function('amset_mesh_file', nargs=1)
@doping_type_option
@doping_option
@doping_function()
@temperature_option
@click.option('--spin',
help='Spin direction.',
Expand Down
2 changes: 2 additions & 0 deletions tp/data/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ def resolve_spin(data, q, spin):
spin2 = 'up'
elif 'energies_down' in f:
spin2 = 'down'
else:
spin2 = spin

data = {'meta': {'doping_type': doping,
'electronic_source': 'amset',
Expand Down

0 comments on commit 4c073a3

Please sign in to comment.