Menu

#355 Bq ghost atom gaussian 98

2.2.x
closed
5
2012-10-23
2008-03-04
Anonymous
No

I am :
Enguerran Vanquelef
enguerran.vanquelef@q4md-forcefieldtools.org

I work with:
Opensuse 10.2 64 bits
Openbabel 2.1.1

The bug I have noted:
I have noted a problem with some gaussian log files.
When a gaussian log file contain a ghost atom (named Bq in the log file) no translation is possible. Openbabel give the following message : segmentation fault.

other files work fine

regards

Enguerran Vanquelef

Discussion

  • Nobody/Anonymous

    gaussian 98 output file

     
  • Nobody/Anonymous

    Logged In: NO

    Hello, I'm working on a tcl script which will translate le Log file to xyz file. Another path is an option in Gaussian : Punch=(coord) will copy in a text files optimized coordinates in atomic units, which is easier to translate in .xyz file than a log file.
    I will inform you...

    thanks

    Enguerran Vanquelef

     
  • Nobody/Anonymous

    Logged In: NO

    Hello,

    I have wrote a smal Tcl script. When Gaussian uses Bq atoms, it generates a coordinate table with center number starting "2" instead of "1". Maybe this is the origin of the bug.

    regards

    PS : The Tcl script if you are interessting :

    !/usr/bin/tclsh

    set path [pwd]
    puts $path

    set liste_log [lsort -dictionary [glob $path/*.log]]
    set nb_log [llength $liste_log]
    puts "il y a $nb_log fichiers .log"

    find the last standard orientation :

    for {set n 0} {$n<$nb_log} {incr n} {
    set nom_fich_log [lindex $liste_log $n]
    puts "\nnom du fichier en cours :[file tail $nom_fich_log]"
    set log_courant [open $nom_fich_log r]
    set hfichxyz [file rootname [file tail $nom_fich_log]].xyz
    set fichxyz [open $hfichxyz w]
    set ligne [gets $log_courant]
    while {$ligne!=" -- Stationary point found."} {
    set ligne [gets $log_courant]
    }
    # I'm just after "Stationnary point found"
    set mot1 [lindex $ligne 0]
    set mot2 [lindex $ligne 1]
    set phrase $mot1$mot2
    while {$phrase!="Standardorientation:"} {
    set ligne [gets $log_courant]
    set mot1 [lindex $ligne 0]
    set mot2 [lindex $ligne 1]
    set phrase $mot1$mot2
    }
    #I'm just after the line "Standard orientation"
    #puts $ligne
    set ligne [gets $log_courant]
    #puts $ligne
    set ligne [gets $log_courant]
    #puts $ligne
    set ligne [gets $log_courant]
    #puts $ligne
    set ligne [gets $log_courant]
    #puts $ligne
    set ligne [gets $log_courant]
    #puts "coorodos:"
    #Next line is the start of coordinates block
    set i 1
    while {[lindex $ligne 0]!="---------------------------------------------------------------------"} {
    switch [lindex $ligne 1] {
    6 {set tab(nom,$i) "C"}
    1 {set tab(nom,$i) "H"}
    8 {set tab(nom,$i) "O"}
    7 {set tab(nom,$i) "N"}
    16 {set tab(nom,$i) "S"}
    default {set tab($i,nom) "*"}
    }
    set tab(X,$i) [lindex $ligne 3]
    set tab(Y,$i) [lindex $ligne 4]
    set tab(Z,$i) [lindex $ligne 5]
    #puts "[lindex $ligne 1]\t [lindex $ligne 3]\t [lindex $ligne 4]\t [lindex $ligne 5]"
    set ligne [gets $log_courant]
    incr i
    }
    puts $fichxyz "[expr $i-1]"
    puts $fichxyz "[file tail $nom_fich_log]"
    for {set m 1} {$m<$i} {incr m} {
    puts $fichxyz "$tab(nom,$m)\t[format %+8.6f $tab(X,$m)]\t[format %+8.6f $tab(Y,$m)]\t[format %+8.6f $tab(Z,$m)]"
    }
    }
    close $fichxyz
    close $log_courant

    I must unset all variables

     
  • Nobody/Anonymous

    Logged In: NO

    Hello,

    a problem occurs with my tcl script with another Gaussian 98 output file which contain a Bq atom.
    I have found a small solution but not very "regular" :
    I had to replace "Input orientation" by "Standrad orientation" few lines under "Stationary point found" and I have modified the Tcl script (find it below, I have added Bq case in the switch block).

    regards

    Enguerran Vanquelef

    !/usr/bin/tclsh

    set path [pwd]
    puts $path
    set liste_log [lsort -dictionary [glob $path/*.log]]
    set nb_log [llength $liste_log]
    puts "il y a $nb_log fichiers .log"

    find the last standard orientation :

    for {set n 0} {$n<$nb_log} {incr n} {
    set nom_fich_log [lindex $liste_log $n]
    puts "nom du fichier en cours : [file tail $nom_fich_log]"
    set log_courant [open $nom_fich_log r]
    set hfichxyz [file rootname [file tail $nom_fich_log]]_opt.xyz
    set fichxyz [open $hfichxyz w]
    set ligne [gets $log_courant]
    while {$ligne!=" -- Stationary point found."} {
    set ligne [gets $log_courant]
    }
    # I'm just after "Stationnary point found"
    set mot1 [lindex $ligne 0]
    set mot2 [lindex $ligne 1]
    set phrase $mot1$mot2
    while {$phrase!="Standardorientation:"} {
    set ligne [gets $log_courant]
    set mot1 [lindex $ligne 0]
    set mot2 [lindex $ligne 1]
    set phrase $mot1$mot2
    }
    #I'm just after the line "Standard orientation"
    set ligne [gets $log_courant]
    set ligne [gets $log_courant]
    set ligne [gets $log_courant]
    set ligne [gets $log_courant]
    set ligne [gets $log_courant]
    #Next line is the start of coordinates block
    set i 1
    while {[lindex $ligne 0]!="---------------------------------------------------------------------"} {
    switch [lindex $ligne 1] {
    6 {set tab(nom,$i) "C"}
    1 {set tab(nom,$i) "H"}
    8 {set tab(nom,$i) "O"}
    7 {set tab(nom,$i) "N"}
    16 {set tab(nom,$i) "S"}
    0 {set tab(nom,$i) "Bq"}
    default {set tab($i,nom) "*"}
    }
    set tab(X,$i) [lindex $ligne 3]
    set tab(Y,$i) [lindex $ligne 4]
    set tab(Z,$i) [lindex $ligne 5]
    set ligne [gets $log_courant]
    incr i
    }
    puts $fichxyz "[expr $i-1]"
    puts $fichxyz "[file tail $nom_fich_log]"
    for {set m 1} {$m<$i} {incr m} {
    puts $fichxyz "$tab(nom,$m)\t[format %+8.6f $tab(X,$m)]\t[format %+8.6f $tab(Y,$m)]\t[format %+8.6f $tab(Z,$m)]"
    }
    }
    close $fichxyz
    close $log_courant

    I must unset all variables

     
  • Geoff Hutchison

    Geoff Hutchison - 2008-06-20

    Logged In: YES
    user_id=21420
    Originator: NO

    This works just fine with the 2.2 development code in SVN. I would be happy to send you a source snapshot if you wish.

     
Auth0 Logo