ISISNeutronMuon / ISISNeutronMuon/MDMC
Why are the atom IDs different to their index in universe.atoms
- Dominant language
- Python
- Stars
- 4
- Forks
- 0
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 5
Description
**Describe the expected result**
I would've expected the atom's ID to be simply their index (or their index + 1) in the universe.atom list.
**Describe the actual result**
Here, I create a script that creates a system of water molecules and then fills the universe with them. When I print the IDs of the atoms, it is quite different from their index in the universe.atoms list.
```
from MDMC.MD import *
universe = Universe(dimensions=21.75)
H1 = Atom('H')
H2 = Atom('H', position=(0., 1.63298, 0.))
O = Atom('O', position=(0., 0.81649, 0.57736))
water_mol = Molecule(position=(0, 0, 0),
velocity=(0, 0, 0),
atoms=[H1, H2, O],
name='water')
universe.fill(water_mol, num_density=0.03356718472021752)
for k, atom in enumerate(universe.atoms):
print(k, atom.ID)
```
Here is the output
```
Universe created with:
Dimensions [21.75 21.75 21.75]
0 1
1 2
2 3
3 5
4 6
5 7
6 9
7 10
8 11
9 13
10 14
11 15
12 17
13 18
14 19
...
1014 1353
1015 1354
1016 1355
1017 1357
1018 1358
1019 1359
1020 1361
1021 1362
1022 1363
1023 1365
1024 1366
1025 1367
1026 1369
1027 1370
1028 1371
```
This doesn't seem like an issue, but it looks unexpected.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.