Input file aenet -md.py

108 views
Skip to first unread message

chooj...@gmail.com

unread,
Feb 14, 2019, 1:40:58 PM2/14/19
to aenet
Hello Dr Nong

I have a little question i want use other format to run aenet-md.py like .xsf or .xyz. In the aenet/Documentation it says:

"The input files for both Python scripts use the JSON format and are compatible. Any structure format supported by ASE can be used as input, however, as of writing, the support of the XSF structure format in ASE is incomplete and other formats (e.g., VASP’s POSCAR format, FHI-aims geometry.in format, XYZ, etc.) are recommended.

structure_file (MD only) Path to the file with the initial structure. Every structure format that is understood by ASE can be used."

But i can't run in my terminal say :

  File "/home/christian/.local/bin/aenet-md.py", line 4, in <module>
    __import__('pkg_resources').run_script('aenet==0.1.0a1', 'aenet-md.py')
  File "/home/christian/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 661, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/christian/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1441, in run_script
    exec(code, namespace, namespace)
  File "/home/christian/.local/lib/python3.6/site-packages/aenet-0.1.0a1-py3.6-linux-x86_64.egg/EGG-INFO/scripts/aenet-md.py", line 106, in <module>
    get_ANN_energy(input_file=args.input_file)
  File "/home/christian/.local/lib/python3.6/site-packages/aenet-0.1.0a1-py3.6-linux-x86_64.egg/EGG-INFO/scripts/aenet-md.py", line 76, in get_ANN_energy
    atoms = ase.io.read(structure_file, format='vasp')
  File "/home/christian/.local/lib/python3.6/site-packages/ase/io/formats.py", line 291, in read
    return next(_iread(filename, slice(index, None), format, **kwargs))
  File "/home/christian/.local/lib/python3.6/site-packages/ase/io/formats.py", line 362, in _iread
    for dct in io.read(fd, *args, **kwargs):
  File "/home/christian/.local/lib/python3.6/site-packages/ase/io/formats.py", line 190, in wrap_read_function
    yield read(filename, **kwargs)
  File "/home/christian/.local/lib/python3.6/site-packages/ase/io/vasp.py", line 122, in read_vasp
    lattice_constant = float(f.readline().split()[0])
IndexError: list index out of range

you can help me to fix this problem?

Best

Christian rodriguez
IF-UNAM-Mexico

Nongnuch Artrith

unread,
Feb 14, 2019, 3:17:09 PM2/14/19
to chooj...@gmail.com, aenet
Hello Christian,

It looks like your structure file could not be read by ASE code.  

ASE tried to parse your file as VASP (POSCAR or file.vasp) format or FHIaims (geometry.in) format or XYZ (file.xyz) format.  Can you convert your input file to one of those format?

In any case, the error message does not seem to be related to aenet.

Cheers,
Nong

chooj...@gmail.com

unread,
Feb 14, 2019, 5:36:20 PM2/14/19
to aenet
Hello

I have my structure in both formats .vasp and .xyz, I was check it the file aenet-md.py and the struture_file say 'vasp':

def get_ANN_energy(input_file):
    (structure_file, T, dt, md_steps, print_steps,
     trajectory_file, potentials) = parse_input(input_file)
    # atomic structure

    atoms = ase.io.read(structure_file, format='vasp')
    # ANN calculator


I compiletd again the setup of python of aenet changed vasp by .xyz and ran it well. So if i want to used one kind of input file, i will to change and compiled.

Well for this moment that was my solution.

Regards

Nongnuch Artrith

unread,
Feb 14, 2019, 5:51:32 PM2/14/19
to chooj...@gmail.com, aenet
Hi Christian,

I am sorry, you are right. In the current version of 'aenet-md' the file format is hard-coded as 'vasp'. You found the right solution, thanks for sending this to the mailing list so that others can also use this approach.

Thanks again.

Best,
Nong

Reply all
Reply to author
Forward
0 new messages