aplowman / castep-parse Goto Github PK
View Code? Open in Web Editor NEWInput file writers and output file readers for the density functional theory code CASTEP.
License: Mozilla Public License 2.0
Input file writers and output file readers for the density functional theory code CASTEP.
License: Mozilla Public License 2.0
castep-parse/castep_parse/readers.py
Line 862 in 678e977
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
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()
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.