GithubHelp home page GithubHelp logo

eandklahn / phd_repo Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 0.0 5.17 MB

A collection of Python-code that I use/have been using for my work in neutron diffraction, molecular magnetism and as a TA in physical chemistry

Python 80.22% HTML 19.78%
python3 numpy crystallography magnetism physical-chemistry

phd_repo's Introduction

phd_repo's People

Contributors

eandklahn avatar

Stargazers

 avatar  avatar

phd_repo's Issues

Multiple crystalStructure classes

there are multiple classes called crystalStructure under crystallography.py, crystallography_v1.0.py and cifoperations/crystalStructure.py

these should be combined

Writing cry-file A-cards from crystalStucture

crystalStructure-class does not save the Uiso-value from the cif-file when the Utype is Uani

It is a problem because generating a cry-file when occupancies are not 1 requires the Uiso-value to be put into the A-card

crystalStructure unable to initialize from CIF if current working directory is not the directory containing the file

Example of problem

from cifoperations import cc
dbm = cc.crystalStructure('C:\Users\Emil\Documents\Uddannelse\PhD\pnd_susceptibility\magnetic_ellipsoids\DBM.cif')
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Emil\Documents\Uddannelse\PhD\pyLIB\cifoperations\cc.py", line 120, in init
self._read_CIF()
File "C:\Users\Emil\Documents\Uddannelse\PhD\pyLIB\cifoperations\cc.py", line 180, in _read_CIF
cf = CifFile.ReadCif(self.cifFile)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\CifFile\CifFile_module.py", line 3108, in ReadCif
permissive=permissive)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\CifFile\StarFile.py", line 2174, in ReadStar
filestream = urlopen(my_uri)
File "C:\Program Files (x86)\Python36-32\lib\urllib\request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "C:\Program Files (x86)\Python36-32\lib\urllib\request.py", line 526, in open
response = self._open(req, data)
File "C:\Program Files (x86)\Python36-32\lib\urllib\request.py", line 549, in _open
'unknown_open', req)
File "C:\Program Files (x86)\Python36-32\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "C:\Program Files (x86)\Python36-32\lib\urllib\request.py", line 1388, in unknown_open
raise URLError('unknown url type: %s' % type)
urllib.error.URLError:
import os
os.getcwd()
'C:\Users\Emil'

Symmetry cards being read wrong

it looks like the function _read_symmop in cifoperations.symmetry is reading the symmetry element wrong when the translation is given before the rotation,
i.e.
x-1/2, -y-1/2, z-1/2 is being read correctly
but for
1/2+X,1/2-Y,1/2+Z,
the translational part is being returned as (0,0,0).

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.