Git Product home page Git Product logo

soprano's People

Contributors

davedavemckay avatar higgs-bosoff avatar jkshenton avatar lauramurgatroyd avatar samueljackson92 avatar stur86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

soprano's Issues

Avoiding exceptions in command line interface

I would reserve exceptions for internal errors, rather than general invalid user input. e.g. an innocent:
soprano nmr -o test CONGRS_nmr.magres

generates:
Writing output to test
Traceback (most recent call last):
File "C:\Users\PAUL\anaconda3\envs\sopranotest\Scripts\soprano-script.py", line 33, in
sys.exit(load_entry_point('Soprano', 'console_scripts', 'soprano')())
File "C:\Users\PAUL\anaconda3\envs\sopranotest\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\PAUL\anaconda3\envs\sopranotest\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\PAUL\anaconda3\envs\sopranotest\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\PAUL\anaconda3\envs\sopranotest\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\PAUL\anaconda3\envs\sopranotest\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "d:\dch0ph\ccp-nc\jkshenton-soprano\soprano\scripts\nmr.py", line 351, in nmr
print_results(dfs, output, output_format, verbose)
File "d:\dch0ph\ccp-nc\jkshenton-soprano\soprano\scripts\cli_utils.py", line 510, in print_results
raise ValueError(f'Unknown output format: {output_format}')
ValueError: Unknown output format:

!

I would use sys.exit("error message") for this kind of thing.

I would specifically trap "no file extension" provided to print a helpful message about output type being deduced from file extension (and values accepted).

Could add .txt for tab separated?

Paul

License files

Under Windows license.txt and LICENSE.txt are seen as the same file due to the case insensitive file system - only one file can be unzipped.

requirements.txt out of date

The current version of requierments.txt has ASE v 3.16 - this is very out of date. It's a problem for e.g. running tutorials in the cloud via Binder.

Command line interface

The solid state NMR community needs a set of scripts or an easy-to-use command-line interface to perform common post-processing tasks.

Some of the desired functionality includes:

  • Extract and summarise:

    • EFG values from a (set of) .magres file(s)
      • calculate NQR transition frequencies
    • MS values from a (set of) .magres file(s)
    • J-coupling values from a (set of) .magres file(s)
    • Dipolar coupling from a structure file (in any ASE-readable format)
  • Select by:

    • Species
    • CIF label
  • Average over:

    • symmetry-equivalent sites
      • Magnetically equivalent sites
    • sites with the same CIF label
    • groups such as CH3
  • Query:

    • Simple syntax to query the final output summaries e.g. (EFG_alpha >10 and EFG_alpha < 60)
  • Output

    • Results to CSV files
    • Spin system to e.g. SIMPSON
  • Plot

    • Basic 1D spectrum
    • Basic 2D spectrum

I have started adding in this functionality here: https://github.com/jkshenton/soprano/tree/magrespython-scripts

Isotope data overhaul

The isotope data (nuclear spin, quadrupole moments etc.) need to be checked/outsourced to an external library with clearer provenance. Perhaps https://github.com/lmmentel/mendeleev ?

  • Some existing data seems to be wrong: For example, the quadrupole moment on 19F is zero in its ground state, not -94.2 mb as in the https://github.com/CCP-NC/soprano/blob/master/soprano/data/nmrdata.json file... That number appears to be for the 5/2 spin excited state (197 keV above the ground state).

  • Data on lots of isotopes is missing. e.g. for 8Li, a commonly used isotope in beta-NMR.

Add NH3 and CH3 NMR averaging script

Add a command line tool to analyse molecular organic crystals and average the NMR tensors of hydrogen atoms belonging to highly mobile groups.

defectGen test occasionally fails

Test case for defectGen occasionally fails, as some defects seem to be placed too close wrt the given poisson_r parameter. Could be either an issue with the test or with the functionality.

Add high level property for "site label"

Currently one can use recursive_mol_label(index, indices, bonds, elems) to produce a string representation of a structure starting at index. It would be a nice feature to have a AtomsProperty for this in soprano.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.