How to make the system neutral in CIF files

Hi everyone,
I am a new GULP learner and a basic question bothers me when I try to fit the potential parameter using a CIF file of AlF3 as below. Warning like “the system is not neutral” would appear and the program is terminated. I see that the CIF file only give the irreducible atoms and the species I use seems to be neutral in the chemical formula (partial charge: Al:+1.8; F:-0.6). So I don’t know the reason and hope to get some help. The CIF file (searched in the Findit Software), input and output files are listed below.

CIF file:

data_29131-ICSD
#?2010 by Fachinformationszentrum Karlsruhe, and the U.S. Secretary of 
#Commerce on behalf of the United States.  All rights reserved.
_database_code_ICSD                29131
_audit_creation_date               1986/08/04
_audit_update_record               2010/08/01
_chemical_name_systematic          'Aluminium Trifluoride'
_chemical_formula_structural       'Al F3'
_chemical_formula_sum              'Al1 F3'
_publ_section_title
;
Structure of the trifluorides of aluminium, iron, cobalt, rhodium, 
and palladium
;
loop_
_citation_id
_citation_journal_abbrev
_citation_year
_citation_journal_volume
_citation_page_first
_citation_page_last
_citation_journal_id_ASTM
primary 'Nature (London)' 1931 128 303 303 NATUAS
_publ_author_name                  'Ketelaar, J.A.A.'
_cell_length_a                     4.93
_cell_length_b                     4.93
_cell_length_c                     6.25
_cell_angle_alpha                  90.
_cell_angle_beta                   90.
_cell_angle_gamma                  120.
_cell_volume                       131.55
_cell_formula_units_Z              3
_symmetry_space_group_name_H-M     'P 3 2 1'
_symmetry_Int_Tables_number        150
loop_
_symmetry_equiv_pos_site_id
_symmetry_equiv_pos_as_xyz
  1	'x-y, -y, -z'
  2	'-x, -x+y, -z'
  3	'y, x, -z'
  4	'-x+y, -x, z'
  5	'-y, x-y, z'
  6	'x, y, z'
loop_
_atom_type_symbol
_atom_type_oxidation_number
Al3+	3
F1-	-1
loop_
_atom_site_label
_atom_site_type_symbol
_atom_site_symmetry_multiplicity
_atom_site_Wyckoff_symbol
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_occupancy
_atom_site_attached_hydrogens
Al1 Al3+ 1 a 0 0 0 1. 0 
Al2 Al3+ 2 d 0.3333 0.6667 0.667 1. 0 
F1 F1- 3 f 0.667 0.667 0.5 1. 0 
F2 F1- 6 g 0.167 0.833 0.167 1. 0 
#End of data_29131-ICSD

Input file:

fit opti prop conp 
cell
4.93 4.93 6.25 90 90 120
frac
Al	0	0	0
Al	0.3333	0.6667	0.667
F	0.667	0.667	0.5
F	0.167	0.833	0.167
space
150
species
Al  1.8
F   -0.6
buckingham
Al Al   0 1 0 0.0 10.0 0 0 0
Al F    47181.82 5.48 22.75 0.0 10.0 1 0 0
F  F    11510.594 0.225005 29.257 0.0 12.0 0 0 0

Output files:

 Job Started  at 01:28.49 23rd May        2021                               
  Number of CPUs =     1
  Total number of configurations input =      1
  Configuration number =   1
      **** Unit cell is not charge neutral    **
      **** Sum of charges =    7.2000000000   **
      **** Check that a special position atom **
      **** coordinate has not been varied     **
--------------------------------------------------------------------------------
     No.  Atomic         x            y            z          Charge  Occupancy
          Number       (frac)       (frac)       (frac)         (e)  
--------------------------------------------------------------------------------
      1  Al    c      0.000000     0.000000     0.000000      1.800000  1.0000
      2  Al    c      0.333300     0.666700     0.667000      1.800000  1.0000
      3  Al    c      0.333300     0.666600     0.667000      1.800000  1.0000
      4  Al    c      0.333400     0.666700     0.667000      1.800000  1.0000
      5  Al    c      0.666600     0.333300     0.333000      1.800000  1.0000
      6  Al    c      0.666700     0.333400     0.333000      1.800000  1.0000
      7  Al    c      0.666700     0.333300     0.333000      1.800000  1.0000
      8  F     c      0.667000     0.667000     0.500000     -0.600000  1.0000
      9  F     c      0.333000     0.000000     0.500000     -0.600000  1.0000
     10  F     c      0.000000     0.333000     0.500000     -0.600000  1.0000
     11  F     c      0.167000     0.833000     0.167000     -0.600000  1.0000
     12  F     c      0.167000     0.334000     0.167000     -0.600000  1.0000
     13  F     c      0.666000     0.833000     0.167000     -0.600000  1.0000
     14  F     c      0.334000     0.167000     0.833000     -0.600000  1.0000
     15  F     c      0.833000     0.666000     0.833000     -0.600000  1.0000
     16  F     c      0.833000     0.167000     0.833000     -0.600000  1.0000
--------------------------------------------------------------------------------

Sorry to bother and all guidance would be greatly appreciated!

Sincerely,
Ji Yao

Hi Ji Yao, Solids have to be charge neutral & so that’s why there is the error. The reason, as you can see from your output, is that you have multiple atoms at the same crystallographic site and so this makes the charges not add up to zero. The cause of the problem is a precision issue in the CIF file which has gone through to your input. Unfortunately numbers like 0.3333 are not exactly 1/3 and so there is a rounding error. In GULP you can handle this by giving the correct value to at least 6 d.p. or, even better, you can use fractions and input as “1/3” in which case it will be exact to double precision. You just need to check your coordinates for special positions and use the exact fractions without significant rounding errors.
Regards, Julian

Thanks a lot Julian! I’ve saw this explanation in the manual of GLIP, however I did not realize it was the problem. Feel sorry for wasting your time and wish you have a good day.
Sincerely,
Ji Yao