Comments (2)
Hi,
As a general principle, GIGO: garbage in, garbage out.
Indeed Atomsk assumes that the input file is consistent, i.e. that the number of atoms declared at the beginning corresponds to the actual number of atoms whose positions are given afterwards. If it is not the case, it can lead to errors. So, when removing atoms manually I recommend to also modify the number of atoms declared at the beginning of the file, so as to maintain consistency. In LAMMPS data files that means also changing the index of atoms, which can be quite tedious to do by hand.
I understand that it would be useful if Atomsk could read the input file and "fix" the inconsistencies automatically, however this poses several problems. Imagine a file where the actual number of atoms is different from the declared number of atoms. I can think of at least four different reasons for that:
(1) the user added or deleted atoms in the file "by hand" (this is the one you describe);
(2) the user modified the declaration of number of atoms at the beginning, because he wants to get rid of the last atoms (because if the user messed up the file by hand, he could have modified any line, anywhere in the file);
(3) the software that wrote the file is buggy and produced the inconsistency without the user's knowledge (so, should Atomsk try to "fix" it without the user's knowledge?);
(4) the file was corrupted on the disk, because of an error during copy or network transfer (yes, hardware problems can still occur).
It is impossible to know which solution is correct, so the programmer has to make a choice. I think that the safest and most general choice, is to display a warning to tell the user that the input file is inconsistent, because the user should be made aware of such problems, instead of trying to hide them under the carpet.
By the way, this behaviour is also the one of many other softwares like LAMMPS, Ovito, VESTA etc.: if the input file does not comply to the format or contains inconsistencies, these softwares will also complain and refuse to proceed.
So, the behaviour you describe is not a bug, it's a feature ;-) And I do not think anything can be done to try and "fix" it. But I will leave this thread open for you to explain your ideas on this topic.
from atomsk.
Hi!
I see! Thanks for this detailed description!
I understand that I might be talking about a very specific case (Lammps data file in a "dirty" work pipeline). To be very precise, here was my pipline:
- lmp file created by atomsk,
- atom removed with Ovito > exported in lmp
- read and relaxed by lammps > output in *lmp format
- read by atomsk to create a solid solution: WARNING out of bounds
The out of bounds index didn't crash Lammps nor Ovito. Also, in some case, it might be interesting to have non-continuous atom index, for example to differentiate two phases (but I agree that it could be considered as "bad practice").
If you think this is too specific or/and could lead to unwanted behavior, feel free to 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.