Znn3bq.jpeg
²é¿´: 440  |  »Ø¸´: 0

fwang2011

½ð³æ (СÓÐÃûÆø)


[×ÊÔ´] cclib ´¦Àí´óÓÚ100¸öÔ­×ÓµÄϵͳ (GAMESS, parser)

ǰ¶Îʱ¼ä×Ô¼ºÓöµ½µÄÎÊÌ⣬cclib´¦Àí´óÓÚ100¸öÔ­×ÓµÄϵͳ³ö´í¡£

ÏÂÃæÊǰ³µÄ´¦Àí·½·¨£¬¹²Ïí£º
Here is the root problem: cclib (the current released version) cannot parse the log file of system with natom >= 100.

In the log file for the Eigenvalues/MOs:
518  H 98  S   -0.000000   0.000000  -0.000000  -0.000000  -0.000000
  519  C 99  S   -0.000000   0.000000  -0.000000  -0.000000  -0.000000
  520  C 99  S   -0.000000   0.000000  -0.000000  -0.000000  -0.000000
  521  C 99  X   -0.000000   0.000000  -0.000000  -0.000000  -0.000000
  522  C 99  Y   -0.000000   0.000000  -0.000000  -0.000000  -0.000000
  523  C 99  Z   -0.000000   0.000000  -0.000000  -0.000000  -0.000000
  524  H  0  S   -0.000000   0.000000  -0.000000  -0.000000  -0.000000
  525  H  1  S   -0.000000   0.000000  -0.000000  -0.000000  -0.000000
  526  C  2  S   -0.000000   0.000000  -0.000000  -0.000000  -0.000000

The number of atoms are recorded as 0, 1, ...,  instead of 100/200/..., 101/201/..., which is however problematic in calculating CSPA.

My resolution is: introducing a switch to monitor this change. The corresponding code, in gamessparser.py is partially copied in the following:

LINE 714:
               p = re.compile("(\d+)\s*([A-Z][A-Z]?)\s*(\d+)\s*([A-Z]+)"
                oldatom ='0'
                i_atom = 0      #couter to translate to 0s to some hundreds, by C.W.
                flag_w = True   #Flag to whether
                for i in range(self.nbasis):
                    line = inputfile.next()

                    # If line is empty, break (ex. for FMO in exam37).
                    if not line.strip(): break

                    # Fill atombasis and aonames only first time around
                    if readatombasis and base == 0:
                        aonames = []
                        start = line[:17].strip()
                        m = p.search(start)
                        if m:
                            g = m.groups()
                            g2 = int(g[2])  #atom index from GAMESS's log file
                            if g2 == 0 and flag_w:                      #c.w.
                                i_atom = i_atom + 100           #c.w
                                flag_w = False
                            if g2 != 0:
                                flag_w = True
                            g2 = g2 + i_atom            #c.w.
                            aoname = "%s%s_%s" % (g[1].capitalize(), str(g2), g[3])     #c.w.
                          #  aoname = "%s%s_%s" % (g[1].capitalize(), g[2], g[3])
                            oldatom = str(g2)   #c.w.
                            atomno = g2 - 1     #c.w.
                         #   oldatom = g[2]
                         #  atomno = int(g[2])-1
                            orbno = int(g[0])-1

                        else: # For F orbitals, as shown above
                            g = [x.strip() for x in line.split()]
                            g2 = int(g[2])  #atom index from GAMESS's log file
                            if g2 == 0 and flag_w:                      #c.w.
                                i_atom = i_atom + 100           #c.w.
                                flag_w = False                  #c.w.
                            if g2 != 0: #c.w.
                                flag_w = True           #c.w.
                            g2 = g2 + i_atom            #c.w.
                           # aoname = "%s%s_%s" % (g[1].capitalize(), oldatom, g[2])
                            aoname = "%s%s_%s" % (g[1].capitalize(), oldatom, str(g2))
                            atomno = int(oldatom)-1
                            orbno = int(g[0])-1
                        self.atombasis[atomno].append(orbno)
                        self.aonames.append(aoname)
                    coeffs = line[15:] # Strip off the crud at the start.
                    j = 0
                    while j*11+4 < len(coeffs):
                        self.mocoeffs[0][base+j, i] = float(coeffs[j * 11j + 1) * 11])
                        j += 1

            line = inputfile.next()

Enjoy!
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ÖÇÄÜ»úÆ÷ÈË

Robot (super robot)

ÎÒÃǶ¼°®Ð¡Ä¾³æ

Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ fwang2011 µÄÖ÷Ìâ¸üÐÂ
¡î ÎÞÐǼ¶ ¡ï Ò»ÐǼ¶ ¡ï¡ï¡ï ÈýÐǼ¶ ¡ï¡ï¡ï¡ï¡ï ÎåÐǼ¶
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 339Çóµ÷¼Á +8 hanwudada 2026-04-11 9/450 2026-04-12 15:36 by laoshidan
[¿¼ÑÐ] ÇóÖúµ÷¼Á£¬¿çµ÷ +12 XÊ®¸¦´çY 2026-04-11 12/600 2026-04-12 10:20 by zhouyuwinner
[¿¼ÑÐ] 291Çóµ÷¼Á +8 ¹ØÒä±±. 2026-04-11 8/400 2026-04-12 09:32 by ÄæË®³Ë·ç
[¿¼ÑÐ] Çóµ÷¼Á£¬Ò»Ö¾Ô¸²ÄÁÏ¿ÆÑ§Ó빤³Ì985£¬365·Ö£¬ +8 ²Ä»¯Àî¿É 2026-04-11 10/500 2026-04-12 08:42 by 852137818
[¿¼ÑÐ] 26×ÔÈ»µØÀíѧ303·ÖÇóµ÷¼Á +6 Ò»Õ½³É˶°¡°¡°¡° 2026-04-06 11/550 2026-04-11 21:27 by Åáºêΰ
[¿¼ÑÐ] µ÷¼Á +6 ÇàµÆ²»¸º 2026-04-09 6/300 2026-04-11 20:35 by dongdian1
[¿¼ÑÐ] 22408 352·ÖÇóµ÷¼Á +4 ŬÁ¦µÄÏÄÄ© 2026-04-09 4/200 2026-04-11 10:42 by maddjdld
[¿¼ÑÐ] 282£¬Çóµ÷¼Á +12 jggshjkkm 2026-04-09 14/700 2026-04-11 09:39 by Öí»á·É
[¿¼ÑÐ] Ò»Ö¾Ô¸»ªÄÏÀí¹¤´óѧ331·Ö²ÄÁÏÇóµ÷¼Á +9 ÌìÏÂww 2026-04-09 9/450 2026-04-10 22:58 by Ftglcn90
[¿¼ÑÐ] ÉúÎïѧ308·ÖÇóµ÷¼Á£¨Ò»Ö¾Ô¸»ª¶«Ê¦´ó£©×ö¹ý·Ö×ÓʵÑé +8 ÏàÐűػá¹ââÍòÕ 2026-04-07 9/450 2026-04-10 21:03 by zhouxiaoyu
[¿¼ÑÐ] ¼ª´ó¼ÆËã»ú¼¼Êõ331·Ö£¬Ó¢ÓïÁù¼¶£¬Çóµ÷¼Á +3 ·å·å021116 2026-04-09 3/150 2026-04-10 20:01 by chemisry
[¿¼ÑÐ] 347²ÄÁÏר˶Çóµ÷¼Á +19 zj8215216 2026-04-06 19/950 2026-04-10 09:36 by 690616278
[¿¼ÑÐ] 08¹¤Ñ§ 309·ÖÇóµ÷¼Á +6 Yin DY 2026-04-08 6/300 2026-04-10 09:18 by Delta2012
[¿¼ÑÐ] 085404£¬285·ÖÇóµ÷¼Á +12 Þ±Þ±¿¼ÑÐ 2026-04-07 14/700 2026-04-09 23:10 by parmtree
[¿¼ÑÐ] ¿¼Ñе÷¼Á-²ÄÁÏÀà-284 +28 Ïë»»ÊÖ»ú²»Ïë½âÊ 2026-04-08 28/1400 2026-04-09 20:08 by µ¹Êý321?
[¿¼ÑÐ] 085400µç×ÓÐÅÏ¢Àࣨ´¨´ó¿ØÖƹ¤³Ì£©Çóµ÷¼Á¿É¿çרҵ ÇóÀÏʦÁªÏµ +3 626776879 2026-04-08 3/150 2026-04-09 16:05 by Öí»á·É
[¿¼ÑÐ] Ò»Ö¾Ô¸ÎäÀí³µÁ¾ 281 Çóµ÷¼Á +5 Éϰ¶Ñо¿Éú. 2026-04-07 5/250 2026-04-09 15:56 by onlyÖÜ
[¿¼ÑÐ] 265Çóµ÷¼Á +4 ·ç˵ËýÔçÍüÁË 2026-04-07 4/200 2026-04-09 13:59 by onlyÖÜ
[¿¼ÑÐ] ר˶0854³õÊÔ¿¼²Ä¿Æ»ù£¬Çóµ÷¼Á +7 3220548044 2026-04-06 10/500 2026-04-08 21:59 by hypershenger
[¿¼ÑÐ] 22408 266Çóµ÷¼Á +11 masss11222 2026-04-07 14/700 2026-04-08 11:06 by yulian1987
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û