Menu

#7 CHARMm

open
nobody
None
3
2012-10-23
2002-03-29
No

CHARMm file format should be supported as this was
supported in the original Babel 1.X

Discussion

  • xhong

    xhong - 2005-04-05

    Logged In: YES
    user_id=1253571

    I also think CHARMm file format should be supported. The
    original Babel supported it, and CHARMm is very widely
    used.

     
  • Nobody/Anonymous

    Logged In: NO

    I also think CHARMm file format should be supported it is
    widely used.

    Here is a durty f77 fix for .charmm -> pdb translation.

    Hope it helps...

    Arnaud Blondel ablondel"hâte"pasteur.fr

      program babel
    

    C...
    implicit none
    C...
    integer i,j
    character80 line,olin
    character
    4 tmp
    C...
    100 Continue
    read(5,'(a)',end=1000,err=1000) line
    if (line(1:1).eq.'*') then
    line(6:80)=line(1:75)
    line(1:7)='REMARK '
    write(6,'(a)') line
    elseif (line(45:45).eq.' ') then
    line(8:80)=line(1:73)
    line(1:7)='REMARK '
    write (6,'(a)') line
    else
    olin(1:6)='ATOM '
    C atomnum
    olin(7:11)=line(1:5)
    olin(12:13)=' '
    C type
    if (line(20:20).eq.' ') then
    olin(14:16)=line(17:19)
    else
    olin(13:16)=line(17:20)
    endif
    olin(17:17)=' '
    C resname
    olin(18:21)=line(12:15)
    C resid
    olin(22:26)=line(6:10)
    olin(27:30)=' '
    C x
    olin(31:38)=line(21:28)
    read(line(26:28),'(i3)') i
    read(line(29:29),'(i1)') j
    if ((j.ge.5).and.(i.lt.999)) then
    write(tmp,'(i4)') i+1001
    olin(36:38)=tmp(2:4)
    endif
    C y
    olin(39:46)=line(31:38)
    read(line(36:38),'(i3)') i
    read(line(39:39),'(i1)') j
    if ((j.ge.5).and.(i.lt.999)) then
    write(tmp,'(i4)') i+1001
    olin(44:46)=tmp(2:4)
    endif
    C z
    olin(47:54)=line(41:48)
    read(line(46:48),'(i3)') i
    read(line(49:49),'(i1)') j
    if ((j.ge.5).and.(i.lt.999)) then
    write(tmp,'(i4)') i+1001
    olin(52:54)=tmp(2:4)
    endif

    C beta
    olin(55:80)=' 1.00 0.00 '

         olin(61:66)=line(62:67)
         read(line(66:67),'(i2)') i
         read(line(68:68),'(i1)') j
         if ((j.ge.5).and.(i.lt.99)) then
            write(tmp,'(i4)') i+1001
            olin(65:66)=tmp(3:4)
         endif
    

    C end
    olin(73:76)=line(52:56)
    write (6,'(a)') olin
    endif
    goto 100
    1000 continue
    write(6,'(a)') 'END'
    END

    C 1 2 3 4 5 6
    7
    C23456789012345678901234567890123456789012345678901234567890123456789012
    CTOM 1 N PRO 1 11.294 4.492 5.506 1.00
    0.00
    CTOM 60 N THR 6 -6.793 0.123 7.227 0.00
    0.17 ALCR
    C 60 6 THR N -6.79326 0.12279 7.22699 ALCR 6
    0.16719
    C 1 1 PRO N -11.29359 4.49191 5.50616 DHF1 1
    5.50616
    C 1 1 PRO N 9999.2935 9999.49191 5.50616 DHF1 1
    5.50616

     
  • Bjoern

    Bjoern - 2009-02-19

    Any progress here?

    Would be nice if openbabl could at least convert PDB -> CHARMm .crd and .psf files and vice-versa.

    Kind regards
    spamsuxx