Questions and Answers

0 Like 0 Dislike

adil nadir kaplanseren

Traceback (most recent call last) AND 'C1' errors How solve this problem
KeyError                                  Traceback (most recent call last)
 in run_all(ignore)
     34     else:
     35         outfilelmpdat, outfilepdb = readFiles.convert_structure(infile)
---> 36         createBonds.create_bonds(outfilelmpdat, outfilepdb, bondscale, lattice_in_file, boundaries)
     37 
     38 

~/data/results/1919375/struc2lammpsdf/bin/createBonds.py in create_bonds(outfilelmpdat, outfilepdb, bondscale, files_in_lattice, user_boundaries)
     18     write_coeff('./bonds/new.lmpdat', ntypes)
     19 
---> 20     create_lammps_in(outfilelmpdat, ntypes, outfilepdb, bondscale)
     21     print('Creating bonds ...')
     22     return_code = run_lammps()

~/data/results/1919375/struc2lammpsdf/bin/createBonds.py in create_lammps_in(lmpdatFile, ntypes, outfilepdb, bondscale)
    166     with open(outInfile, 'w') as f:
    167         f.write(constant_string1)
--> 168         f.write(createBondCommands.create_bonds_commands(lmpdatFile, outfilepdb, bondscale))
    169         f.write('write_data ./bonds/bonded.lmpdat \n')
    170 

~/data/results/1919375/struc2lammpsdf/bin/createBondCommands.py in create_bonds_commands(infile, pdbfile, bondscale)
     12     commands += '\n'
     13     combinations = atom_type_combinations(types)
---> 14     cutoff_radii_list = cutoff_radii(combinations, types, bondscale)
     15 
     16     for i in range(len(combinations)):

~/data/results/1919375/struc2lammpsdf/bin/createBondCommands.py in cutoff_radii(type_combinations, types, bondscale)
     73 
     74         a1Number = atomic_numbers[a1Name]
---> 75         a2Number = atomic_numbers[a2Name]
     76 
     77         a1Rad = ob.etab.GetCovalentRad(a1Number)

KeyError: 'C1'

Report abuse

3 Responses

  1. 0 Like 0 Dislike

    Lorena Alzate-Vargas

    I think the error is coming from the structure not being properly converted and atom types therefore are not correctly identified. Sometimes this happens if the input file is not in the right format (some typos in the atom type, spacing incorrect). I recommend checking again the input file and verifying that the tool converts the structure (structure visualization and also it says structure converted).

    Reply Report abuse

    Please login to answer the question.

  2. 0 Like 0 Dislike

    Alfredo Dewittfurt

    Thank you for the explanation. It is clear for me mypascoconnect

    Reply Report abuse

    Please login to answer the question.

  3. 0 Like 0 Dislike

    Terry J Gram

    Thanks for the answer. I was searching for it for my friend.

    Reply Report abuse

    Please login to answer the question.

    1. 0 Like 0 Dislike

      Terry J Gram

      I am glad I have found your post and I will share it with my friend. I am sure he will be very happy because he is trying to figure it out for so long but he can't find the proper solution. I was searching for a additional information for my essay assignment online because I want to check my essay whether there is a plagiarism on my essay or not.

      Reply Report abuse

      Please login to answer the question.