ncrystal icon indicating copy to clipboard operation
ncrystal copied to clipboard

Material with large atom numbers will result in error when using the default d-spacing 0.2 Angstrom

Open XuShuqi7 opened this issue 1 year ago • 5 comments

Hi @tkittel,

I am using NCrystal-v-3.7.1 in MAC OSX system.

The material ncmat file can be found in: https://github.com/highness-eu/ncmat-clathrates/blob/main/HighNESS_1088D2O_192O2_sg1_ClathrateHydrate-sII.ncmat which is composed of over 3000 atoms in a cubic lattice with a side length of ~35 Angstrom.

When using ncrystal_inspectfile HighNESS_1088D2O_192O2_sg1_ClathrateHydrate-sII.ncmat, the result is

==> Normalised cfg-string : "HighNESS_1088D2O_192O2_sg1_ClathrateHydrate-sII.ncmat"
Traceback (most recent call last):
  File "/usr/local/bin/ncrystal_inspectfile", line 860, in <module>
    main()
  File "/usr/local/bin/ncrystal_inspectfile", line 807, in main
    sc_obj = NC.createScatter(normcfg)
  File "/usr/local/share/NCrystal/python/NCrystal/core.py", line 1442, in createScatter
    return Scatter(cfgstr)
  File "/usr/local/share/NCrystal/python/NCrystal/core.py", line 1287, in __init__
    self._rawobj_scat = _rawfct['ncrystal_create_scatter'](_str2cstr(cfgstr))
  File "/usr/local/share/NCrystal/python/NCrystal/_chooks.py", line 191, in fcte
    _raise_err()
  File "/usr/local/share/NCrystal/python/NCrystal/_chooks.py", line 169, in _raise_err
    raise e
NCrystal.exceptions.NCCalcError: Combinatorics too great to reach requested dcutoff = 0.2 Aa```

While ```ncrystal_inspectfile "HighNESS_1088D2O_192O2_sg1_ClathrateHydrate-sII.ncmat;dcutoff=0.5"``` will run correctly. 

Therefore, I think it might be good that NCrystal could adjust automatically the dcutoff for material with large atom numbers.

Thank you for your consideration.

Shuqi

XuShuqi7 avatar Jan 08 '24 15:01 XuShuqi7