Comments (4)
Dear jfikar,
Indeed, it is a consequence of parallelization, where each thread (each CPU core) performs a task independently from the others.
The way I see it, this is not a bug. If I modify the code so that atoms appear in a given order, then it means that CPU cores will be allowed to write their atom positions in a specific order, thus loosing all gain of efficiency of the parallelization.
So, you have to choose between efficiency at the cost of reproducibility (atoms should still be at the same positions, but not in the same order), or reproducibility at the cost of efficiency (use only one thread should produce exactly the same ordering of atoms every time). I don't know any method that would keep good efficiency, and produce the same ordering of atoms.
As a side note: to use a single thread you can either set the environment variable "OMP_NUM_THREADS=1", or use the command-line "-nthreads 1" when running Atomsk.
Best regards
from atomsk.
I see, thank you for explaining the problem.
Is there a way to first sort the atoms by x like -sort x
, but when there are more atoms with the same x, sort these atoms by y and finally if there is a subset of atoms with the same x and y, sort them by z? It would be sane, as there should not be two atoms with all coordinates equal.
from atomsk.
Sorting by Z, then by Y, and finally by X should do the trick, something like:
-sort Z up -sort Y up -sort X up
Nonetheless, if many atoms share an exactly identical coordinate, the order may differ. Atomsk uses quicksort, which splits the list in several pieces. Depending on the size of the list and the split, atoms that have exactly the same coordinate may appear in a different order.
In the end, using a single thread when constructing a polycrystal seems more reliable if you want to have exactly the same order of atoms.
from atomsk.
In absence of reply or comment for over 1 month I close this issue.
from atomsk.
Related Issues (20)
- X!X ERROR: memory (RAM) is insufficient to perform this operation HOT 8
- Option: -disloc file filename nu seems to not work well HOT 4
- Ternary alloy supercell HOT 2
- atomsk --polycrystal gives errors on long angles X an Y HOT 2
- Issue: Undefined memory access HOT 7
- Problems with VASP OUTCAR in mode --one-in-all HOT 5
- Problem when using -properties. HOT 2
- Is it possible to create solid solution like Cd0.5Zn0.5S with atomsk? HOT 2
- Issue with Polycrystal mode HOT 4
- Maximum size of generation in polycrystal mode HOT 2
- How to determine the average grain size in atomsk? HOT 5
- Polycrystal is sometimes missing planes of atoms HOT 4
- Problem when using "--create ... random ..." to generate binary alloys HOT 2
- Is it possible to transform lattice just like the make_supercell() method done in pymatgen or 'Redefine Lattice' in VASPKIT? HOT 2
- Construct heterostructures based on CSL or Zur algorithms. HOT 1
- Construct different stack models for an interface by sampling cell of non-identical displacement (CNID). HOT 1
- Parallel compilation of atomsk requires multiple runs of make. HOT 2
- Can we create Nanoscrolls for TMDCs with the help of atomsk? HOT 1
- Create the nanotube and nanoscroll given in the examples of cif2tube. HOT 2
- Cannot find the FUNCTION "FINDLOC" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atomsk.