Git Product home page Git Product logo

castep-parse's People

Contributors

aplowman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

castep-parse's Issues

`write_input_files` does not work if `param=None`

Since CASTEP works without a param file, write_input_files should also work when the param argument is None. But at the moment, such a scenario rasies a TypeError:

TypeError: 'NoneType' object is not subscriptable

with regards to this line in write_input_files:

task = param['task'].upper()

Parse AIRSS `.res` files

Is there functionality in castep-parse to parse .res files? Specifically, I'm trying to extract the structure in SHELX format and data like pressure, volume, enthalpy, spin and symmetry.

Support parsing DFPT results from the castep file

if 'CASTEP version' in line:

It seems that if the version finding fails, the whole reader fails. This is because unless the version is found, no "version" variable is made, so the next if statement fails.

Can this be avoided by using an else statement and setting the version to nan?

Traceback (most recent call last):
File ".\importer.py", line 95, in
data = cp.readers.read_castep_file(fn1)
File "c:\users\amund\documents\megasync\prosjekter\castep-parse\castep_parse\utils.py", line 391, in decorated
return func(lines, *args, **kwargs)
File "c:\users\amund\documents\megasync\prosjekter\castep-parse\castep_parse\readers.py", line 64, in read_castep_file
run = parse_castep_run(run_str, run_idx)
File "c:\users\amund\documents\megasync\prosjekter\castep-parse\castep_parse\readers.py", line 703, in parse_castep_run
header = parse_castep_file_header(header_str)
File "c:\users\amund\documents\megasync\prosjekter\castep-parse\castep_parse\readers.py", line 866, in parse_castep_file_header
if not version:
UnboundLocalError: local variable 'version' referenced before assignment

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.