Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 227843 Details for
Bug 315387
sci-libs/mmdb: RWBROOK interface misaligns PDB atom name field
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
CCP4 patches to sci-libs/mmdb.
mmdb-1.21-ccp4-6.1.3.patch (text/plain), 5.84 KB, created by
Johan Hattne
on 2010-04-15 05:35:55 UTC
(
hide
)
Description:
CCP4 patches to sci-libs/mmdb.
Filename:
MIME Type:
Creator:
Johan Hattne
Created:
2010-04-15 05:35:55 UTC
Size:
5.84 KB
patch
obsolete
>diff -Naur src/file_.cpp ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/file_.cpp >--- src/file_.cpp 2009-05-06 08:46:03.000000000 -0500 >+++ ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/file_.cpp 2009-07-01 05:58:09.000000000 -0500 >@@ -347,10 +347,10 @@ > if (i>0) sleep ( 1 ); > #endif > if (TextMode) { >- if (ReadOnly) hFile = fopen ( FName,"r" ); >+ if (ReadOnly) hFile = fopen ( FName,"rt" ); > else hFile = fopen ( FName,"r+t" ); > } else { >- if (ReadOnly) hFile = fopen ( FName,"r" ); >+ if (ReadOnly) hFile = fopen ( FName,"rb" ); > else hFile = fopen ( FName,"r+b" ); > } > #ifndef _MVS >diff -Naur src/machine_.h ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/machine_.h >--- src/machine_.h 2009-05-06 08:46:07.000000000 -0500 >+++ ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/machine_.h 2008-09-03 03:51:26.000000000 -0500 >@@ -127,8 +127,12 @@ > # define CALL_LIKE_VMS 1 > > // MVS stands for Microsoft Visual Studio >-#elif defined(_MVS) >+#elif defined(_MSC_VER) >+# if (_MSC_VER) >= 800 >+# define CALL_LIKE_MVS 2 >+# else > # define CALL_LIKE_MVS 1 >+# endif > > #elif defined(F2C) || defined(G77) > # define CALL_LIKE_SUN 8 >@@ -400,6 +404,36 @@ > > #elif defined(CALL_LIKE_MVS) > >+# if ( CALL_LIKE_MVS == 2 ) >+ >+ typedef pstr fpstr; >+ >+# define FTN_STR(s) s >+# define FTN_LEN(s) s##_len >+ >+# define char_struct(s) \ >+ pstr s; \ >+ int s##_len; >+# define fill_char_struct(s,str) \ >+ s = str; \ >+ s##_len = strlen(str); >+ >+# ifdef __cplusplus >+# define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ >+ extern "C" void NAME p_sun >+# else >+# define FORTRAN_SUBR(NAME,name,p_sun,p_stardent,p_mvs) \ >+ void NAME p_sun >+# endif >+ >+# define FORTRAN_EXTERN(NAME,name,p_sun,p_stardent,p_mvs) \ >+ extern "C" void NAME p_sun >+ >+# define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ >+ NAME p_sun >+ >+# else >+ > typedef pstr fpstr; > > # define FTN_STR(s) s >@@ -425,7 +459,7 @@ > > # define FORTRAN_CALL(NAME,name,p_sun,p_stardent,p_mvs) \ > NAME p_mvs >- >+# endif > #else > > # error Unknown machine!!! >diff -Naur src/mmdb_chain.cpp ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/mmdb_chain.cpp >--- src/mmdb_chain.cpp 2009-05-06 08:46:03.000000000 -0500 >+++ ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/mmdb_chain.cpp 2009-08-21 08:35:09.000000000 -0500 >@@ -672,7 +672,8 @@ > i = 0; > sN = 1; > while (i<numRes) { >- PutInteger ( &(S[8]),sN,2 ); >+ //PutInteger ( &(S[8]),sN,2 ); >+ PutInteger ( &(S[7]),sN,3 ); > k = 19; > while ((i<numRes) && (k<70)) { > if (resName[i][0]) >diff -Naur src/mmdb_rwbrook.cpp ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/mmdb_rwbrook.cpp >--- src/mmdb_rwbrook.cpp 2009-05-06 08:46:03.000000000 -0500 >+++ ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/mmdb_rwbrook.cpp 2008-11-27 08:14:25.000000000 -0600 >@@ -1478,7 +1478,6 @@ > SegID sgID; > Element element; > PCAtom atom; >-pstr p; > char charge[10]; > > strcpy ( LastFunc,"MMDB_F_Atom" ); >@@ -1552,10 +1551,9 @@ > } else > charge [0] = char(0); > >-/* > if (FTN_STR(ID)[0]==' ') { > atomName[0] = char(0); >- if ((FTN_STR(AtNam)[1]=='H') || >+ if ((FTN_STR(AtNam)[1]=='H') && (FTN_STR(AtNam)[0]!='H') || > ((FTN_STR(AtNam)[1]=='D') && (FTN_STR(ID)[2]=='D'))) { > i = 0; > while ((i<nHydAtomNames) && >@@ -1563,12 +1561,16 @@ > if (i<nHydAtomNames) > GetStrTer ( atomName,FTN_STR(AtNam),4,5,FTN_LEN(AtNam) ); > } >- if (!atomName[0]) { >+ >+ if ((FTN_STR(AtNam)[0]=='A') || ((FTN_STR(AtNam)[0]=='N') && (FTN_STR(ID)[1]!='N'))) { >+ GetStrTer ( atomName,FTN_STR(AtNam),4,5,FTN_LEN(AtNam) ); >+ } else if ((FTN_STR(ID)[1]=='N') && ( (FTN_STR(AtNam)[0]=='N') && (FTN_STR(AtNam)[1]=='N') )) { >+ GetStrTer ( atomName,FTN_STR(AtNam),4,5,FTN_LEN(AtNam) ); >+ } else if (!atomName[0]) { > atomName[0] = ' '; > GetStrTer ( &(atomName[1]),FTN_STR(AtNam),3,4,FTN_LEN(AtNam) ); > } > } else >-*/ > GetStrTer ( atomName,FTN_STR(AtNam),4,5,4 ); > > >diff -Naur src/mmdb_sbase0.cpp ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/mmdb_sbase0.cpp >--- src/mmdb_sbase0.cpp 2009-05-06 08:46:03.000000000 -0500 >+++ ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/mmdb_sbase0.cpp 2009-07-01 05:52:19.000000000 -0500 >@@ -1320,7 +1320,11 @@ > dirpath = new char[i+10]; > strcpy ( dirpath,path ); > if (i>0) { >+#if defined(_MSC_VER) || defined (WIN32) >+ if (dirpath[i-1]!='\\') strcat ( dirpath,"\\" ); >+#else > if (dirpath[i-1]!='/') strcat ( dirpath,"/" ); >+#endif > } > } > >diff -Naur src/mmdb_selmngr.cpp ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/mmdb_selmngr.cpp >--- src/mmdb_selmngr.cpp 2009-05-06 08:46:03.000000000 -0500 >+++ ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/mmdb_selmngr.cpp 2009-07-01 05:53:24.000000000 -0500 >@@ -1158,7 +1158,7 @@ > int selKey // selection key > ) { > int i,j,k,n,m1,m2,c, sk,nsel; >-Boolean noRes,modelSel,chainSel,resSel,selAND; >+Boolean noRes,modelSel(False),chainSel,resSel,selAND; > PCModel model; > PCChain chain; > PCResidue res; >diff -Naur src/mmdb_title.cpp ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/mmdb_title.cpp >--- src/mmdb_title.cpp 2009-05-06 08:46:03.000000000 -0500 >+++ ../../../ccp4-libs-6.1.3-r1/work/ccp4-6.1.3/lib/src/mmdb/mmdb_title.cpp 2010-01-16 07:30:53.000000000 -0600 >@@ -1381,6 +1381,10 @@ > #define R350_CHAINS 2 > #define R350_BIOMT 3 > >+#ifdef _WIN32 >+#define strcasestr(s, t) strstr(strupr(s), t) >+#endif >+ > void getRemarkKey ( RPCRemark rem, int & lkey ) { > if (rem) { > if (rem->remarkNum!=350) lkey = R350_END;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 315387
: 227843