fable-3dxrd / xrd_simulator Goto Github PK
View Code? Open in Web Editor NEWTools for simulating x-ray diffraction. Detailed documentation is found at the below link.
Home Page: https://fable-3dxrd.github.io/xrd_simulator/
License: MIT License
Tools for simulating x-ray diffraction. Detailed documentation is found at the below link.
Home Page: https://fable-3dxrd.github.io/xrd_simulator/
License: MIT License
Hi Axel,
I just tried to install with a draft environment for the ESRF site conda and I got an error with the version on pip (below). With a git checkout I just needed to bump to allow python 3.11 and then pytest in xrd_simulator/tests is passing.
Shall I send a pull request or is there a reason to avoid python 3.11?
Thanks!
Jon
(jupy2023) hpc5-0301:~/git/PolyXSim/test % pip install xrd-simulator
DEPRECATION: Loading egg at /gpfs/easy/data/id11/jon/mamba/envs/jupy2023/lib/python3.11/site-packages/cctbx_base-2023.8-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
Collecting xrd-simulator
Downloading xrd_simulator-0.1.1-py3-none-any.whl (80 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.4/80.4 kB 6.9 MB/s eta 0:00:00
Collecting matplotlib==3.3.1 (from xrd-simulator)
Downloading matplotlib-3.3.1.tar.gz (38.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.8/38.8 MB 223.7 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
INFO: pip is looking at multiple versions of xrd-simulator to determine which version is compatible with other requirements. This could take a while.
Collecting xrd-simulator
Downloading xrd_simulator-0.0.9-py3-none-any.whl (80 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 105.1 MB/s eta 0:00:00
Downloading xrd_simulator-0.0.8-py3-none-any.whl (80 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 105.4 MB/s eta 0:00:00
Downloading xrd_simulator-0.0.7-py3-none-any.whl (80 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 104.6 MB/s eta 0:00:00
Downloading xrd_simulator-0.0.6-py3-none-any.whl (80 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 111.4 MB/s eta 0:00:00
Downloading xrd_simulator-0.0.5-py3-none-any.whl (80 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 110.0 MB/s eta 0:00:00
Downloading xrd_simulator-0.0.4-py3-none-any.whl (80 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 113.1 MB/s eta 0:00:00
Downloading xrd_simulator-0.0.3-py3-none-any.whl (80 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.3/80.3 kB 111.3 MB/s eta 0:00:00
INFO: pip is still looking at multiple versions of xrd-simulator to determine which version is compatible with other requirements. This could take a while.
Downloading xrd_simulator-0.0.2-py3-none-any.whl (44 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.1/44.1 kB 79.3 MB/s eta 0:00:00
Collecting miniball==1.1.0 (from xrd-simulator)
Downloading miniball-1.1.0.tar.gz (6.3 kB)
Preparing metadata (setup.py) ... done
Collecting xrd-simulator
Downloading xrd_simulator-0.0.1-py3-none-any.whl (44 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.0/44.0 kB 97.2 MB/s eta 0:00:00
ERROR: Cannot install xrd-simulator==0.0.1, xrd-simulator==0.0.2, xrd-simulator==0.0.3, xrd-simulator==0.0.4, xrd-simulator==0.0.5, xrd-simulator==0.0.6, xrd-simulator==0.0.7, xrd-simulator==0.0.8, xrd-simulator==0.0.9 and xrd-simulator==0.1.1 because these package versions have conflicting dependencies.
The conflict is caused by:
xrd-simulator 0.1.1 depends on numpy==1.21.4
xrd-simulator 0.0.9 depends on numpy==1.21.4
xrd-simulator 0.0.8 depends on numpy==1.21.4
xrd-simulator 0.0.7 depends on numpy==1.21.4
xrd-simulator 0.0.6 depends on numpy==1.21.4
xrd-simulator 0.0.5 depends on numpy==1.21.4
xrd-simulator 0.0.4 depends on numpy==1.21.4
xrd-simulator 0.0.3 depends on numpy==1.21.4
xrd-simulator 0.0.2 depends on numpy==1.21.4
xrd-simulator 0.0.1 depends on miniball==1.1.0matplotlib==3.3.1numpy==1.21.4meshio==5.0.2pygalmesh==0.10.6scipy==1.6.1xfab==0.0.4numba
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Hello,
Thank you for this nice library. I had a question, I haven't explored deeply the code yet and was wondering does the code also simulates reflection geometry or is it transmission alone?
Thanks,
Cheers,
Ravi.
Hi Alex,
First off, thank you so much for supporting this code base! I'm a computer scientist attempting to learn about x-ray diffraction and being able to step through this code has been a godsend. A lot of topics that were very confusing to me in the textbook now make perfect sense.
I'm working on a research project around finding new (and hopefully more accurate) ways of doing molecule structure prediction using diffraction data. On that note, I'd like to run a .cif file through the simulator and get intensity values that I can hopefully try to invert using my method.
I am however having an issue getting .cif files taken randomly from the Crystallography Open Database to run. Specifically, the .cif files I'm finding on the internet contain isotopes and it seems the atomlib.py file does not support that? In any case, I'm getting errors that the program does not recognize the atom's name (for example, "SR2+" is the current error I'm getting from a random .cif file).
By chance am I misunderstanding something?
I couldn't find much documentation recommending how to properly use .cif files. By chance would you happen to have any .cif files to share which you know will work? For my purposes I don't really care what the molecule is, as long as its sufficiently large and complex that finding its structure is non-trivial.
Many Thanks!
Eric
Something seems to be broken with the H5 libs on linux, see job fail:
https://github.com/FABLE-3DXRD/xrd_simulator/actions/runs/3311789179/jobs/5468121970
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.