xdrf2pdb D amino
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Fri, 22 Dec 2017 12:25:50 +0000 (13:25 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Fri, 22 Dec 2017 12:25:50 +0000 (13:25 +0100)
source/xdrfpdb/src-M/COMMON.NAMES
source/xdrfpdb/src-M/DIMENSIONS
source/xdrfpdb/src-M/arcos.f
source/xdrfpdb/src-M/geomout.F
source/xdrfpdb/src-M/nazwy.f
source/xdrfpdb/src-M/rescode.f
source/xdrfpdb/src-M/xdrf2pdb.F

index e6f926b..1c85c4f 100644 (file)
@@ -1,6 +1,6 @@
       character*3 restyp
       character*1 onelet
-      common /names/ restyp(ntyp+1),onelet(ntyp+1)
+      common /names/ restyp(-ntyp1:ntyp1),onelet(-ntyp1:ntyp1)
       character*10 ename,wname
       integer nprint_ene,print_order
       common /namterm/ ename(n_ene),wname(n_ene),nprint_ene,
index 32a8ae5..43e77a2 100644 (file)
@@ -38,7 +38,7 @@ C Max. number of contacts per residue
       parameter (maxconts=maxres)
 C Number of AA types (at present only natural AA's will be handled
       integer ntyp,ntyp1
-      parameter (ntyp=20,ntyp1=ntyp+1)
+      parameter (ntyp=24,ntyp1=ntyp+1)
 C Max. number of types of dihedral angles & multiplicity of torsional barriers
 C and the number of terms in double torsionals
       integer maxtor,maxterm,maxlor,maxtermd_1,maxtermd_2
index afc6724..69810ea 100644 (file)
@@ -2,7 +2,7 @@
       implicit real*8 (a-h,o-z)
       include 'COMMON.GEO'
       IF (DABS(X).LT.1.0D0) GOTO 1
-      ARCOS=0.5D0*(PI-DSIGN(1.0D0,X)*PI)
+      ARCOS=0.5D0*(PI+DSIGN(1.0D0,X)*PI)
       RETURN
     1 ARCOS=DACOS(X)
       RETURN
index e8101a2..e356fd2 100644 (file)
@@ -94,7 +94,7 @@ c      endif
         iatom=iatom+1
         ica(i)=iatom
         iti=itype(i)
-        if (iti.eq.21) then
+        if (iti.eq.ntyp1) then
           ichain=ichain+1
           ires=0
           write (iunit,'(a)') 'TER'
@@ -114,12 +114,12 @@ c      endif
       enddo
       write (iunit,'(a)') 'TER'
       do i=nnt,nct-1
-        if (itype(i).eq.21) cycle
-        if (itype(i).eq.10 .and. itype(i+1).ne.21) then
+        if (itype(i).eq.ntyp1) cycle
+        if (itype(i).eq.10 .and. itype(i+1).ne.ntyp1) then
           write (iunit,30) ica(i),ica(i+1)
-        else if (itype(i).ne.10 .and. itype(i+1).ne.21) then
+        else if (itype(i).ne.10 .and. itype(i+1).ne.ntyp1) then
           write (iunit,30) ica(i),ica(i+1),ica(i)+1
-        else if (itype(i).ne.10 .and. itype(i+1).eq.21) then
+        else if (itype(i).ne.10 .and. itype(i+1).eq.ntyp1) then
           write (iunit,30) ica(i),ica(i)+1
         endif
       enddo
index 9f61cfb..d495120 100644 (file)
@@ -4,10 +4,17 @@
       include 'COMMON.NAMES'
       include 'COMMON.FFIELD'
       data restyp /
+     &'DD','DAU','DAI','DDB','DSM','DPR','DLY','DAR','DHI','DAS','DGL',
+     & 'DSG','DGN','DSN','DTH',
+     &'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY','ZER',
      &'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR',
-     &'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','D'/
+     &'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','SME','DBZ',
+     &'AIB','ABU','D'/
       data onelet /
+     &'z','z','z','z','z','p','k','r','h','d','e','n','q','s','t','g',
+     &'a','y','w','v','l','i','f','m','c','x',
      &'C','M','F','I','L','V','W','Y','A','G','T',
-     &'S','Q','N','E','D','H','R','K','P','X'/
+     &'S','Q','N','E','D','H','R','K','P','z','z','z','z','X'/
+      data potname /'LJ','LJK','BP','GB','GBV'/
       end 
 
index 1fff9ec..efa6c5c 100644 (file)
@@ -7,7 +7,7 @@
 
       if (ione.eq.0) then
 
-      do i=1,ntyp1
+      do i=-ntyp1,ntyp1
         if (ucase(nam).eq.restyp(i)) then
           rescode=i
           return
@@ -15,7 +15,7 @@
       enddo
       else
 
-      do i=1,ntyp1
+      do i=-ntyp1,ntyp1
         if (nam(1:1).eq.onelet(i)) then
           rescode=i
           return  
index c87e9ff..503d7d7 100644 (file)
@@ -88,9 +88,9 @@
       endif
       open(9,file=pdbfile)
       nnt = 1
-      if (itype(1).eq.21) nnt = 2
+      if (itype(1).eq.ntyp1) nnt = 2
       nct=nres
-      if (itype(nres).eq.21) nct = nres-1
+      if (itype(nres).eq.ntyp1) nct = nres-1
       print *,"nnt",nnt," nct",nct
       print *,"file",arg
       call xdrfopen(ixdrf,arg, "r", iret)