realbigws / LIG_Tool

Extract ligands from original PDB file
9 stars 4 forks source link

Error: -t LG_TYPE IOPNX should contain 'I', 'O', 'P', 'N', or 'X' #1

Open AntonioSerrano opened 3 years ago

AntonioSerrano commented 3 years ago

If I try to execute any of the example commands, I get the following error message: -t LG_TYPE IOPNX should contain 'I', 'O', 'P', 'N', or 'X' It does matter if I manually specify the -t parameter e.g. ./LIG_Tool -i examples/1paz.pdb -O ./ -t 'IOPNX' Many thx.

realbigws commented 3 years ago

Hi, Antonio.

Did you re-compile the executables from the source code on your system?

I tried the same command, e.g., " ./LIG_Tool -i examples/1paz.pdb -O ./ -t 'IOPNX' ", and it returned the following correct result.

[image: image.png]

======================================

Best, -Sheng

On Fri, Mar 19, 2021 at 4:15 AM Antonio Serrano @.***> wrote:

If I try to execute any of the example commands, I get the following error message: -t LG_TYPE IOPNX should contain 'I', 'O', 'P', 'N', or 'X' It does matter if I manually specify the -t parameter e.g. ./LIG_Tool -i examples/1paz.pdb -O ./ -t 'IOPNX' Many thx.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/realbigws/LIG_Tool/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACD6EWLWWIIP65MG6EU6XQDTEJNNRANCNFSM4ZNKCMDA .

AntonioSerrano commented 3 years ago

Sure. I followed the instructions and there wasn't any error. This is the output of the compilation process:

cd ./LIG_Tool_src&&make make[1]: Entering directory './LIG_Tool/source_code/LIG_Tool_v1.01_src' g++ -O3 -c Utility.cpp g++ -O3 -c Computation_Utility.cpp g++ -O3 -c Confo_Back.cpp g++ -O3 -c Confo_Beta.cpp g++ -O3 -c Confo_Lett.cpp g++ -O3 -c Acc_Surface.cpp g++ -O3 -c getopt.cpp g++ -O3 -c Hydro_Bond.cpp g++ -O3 -c LIG_Tool.cpp LIG_Tool.cpp: In function ‘int Check_LGtype(std::string&)’: LIG_Tool.cpp:1409:1: warning: control reaches end of non-void function [-Wreturn-type] 1409 | } | ^ LIG_Tool.cpp: In function ‘int main(int, char*)’: LIG_Tool.cpp:1464:9: warning: ignoring return value of ‘int system(const char)’, declared with attribute warn_unused_result [-Wunused-result] 1464 | system(command); | ~~^~~~~ LIG_Tool.cpp:1466:9: warning: ignoring return value of ‘int system(const char)’, declared with attribute warn_unused_result [-Wunused-result] 1466 | system(command); | ~~^~~~~ LIG_Tool.cpp:1470:10: warning: ignoring return value of ‘int system(const char)’, declared with attribute warn_unused_result [-Wunused-result] 1470 | system(command); | ~~^~~~~ LIG_Tool.cpp:1475:10: warning: ignoring return value of ‘int system(const char)’, declared with attribute warn_unused_result [-Wunused-result] 1475 | system(command); | ~~^~~~~ LIG_Tool.cpp: In function ‘int PDB_Extract_Ligand(std::string&, std::vector&)’: LIG_Tool.cpp:518:21: warning: ‘%-4d’ directive writing between 4 and 10 bytes into a region of size 5 [-Wformat-overflow=] 518 | sprintf(command,"%-4d",tot_num); | ^~~~ LIG_Tool.cpp:518:20: note: directive argument in the range [0, 2147483647] 518 | sprintf(command,"%-4d",tot_num); | ^~ In file included from /usr/include/stdio.h:867, from /usr/include/c++/9/cstdio:42, from /usr/include/c++/9/ext/string_conversions.h:43, from /usr/include/c++/9/bits/basic_string.h:6493, from /usr/include/c++/9/string:55, from /usr/include/c++/9/stdexcept:39, from /usr/include/c++/9/array:39, from /usr/include/c++/9/tuple:39, from /usr/include/c++/9/bits/stl_map.h:63, from /usr/include/c++/9/map:61, from LIG_Tool.cpp:1: /usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘builtin___sprintf_chk’ output between 5 and 11 bytes into a destination of size 5 36 | return builtin_sprintf_chk (s, USE_FORTIFY_LEVEL - 1, | ~~~~~~^~~~~~~~ 37 | bos (s), fmt, va_arg_pack ()); | ~~~~~~~~~ g++ -O3 -c Mol_File.cpp g++ -O3 -c Mol_Ori.cpp g++ -O3 -c Mol_Out.cpp
g++ -O3 -c PDB_Utility.cpp g++ -O3 -c Backbone_Sidechain.cpp g++ -O3 -c PDB_Residue.cpp g++ -O3 -c PDB_Chain.cpp PDB_Chain.cpp: In member function ‘int PDB_Chain::initialize(int, char)’: PDB_Chain.cpp:59:21: warning: ‘%4d’ directive writing between 4 and 10 bytes into a region of size 6 [-Wformat-overflow=] 59 | sprintf( buff, "%c%4d ", chain_id, i+1 ); | ^~~ PDB_Chain.cpp:59:18: note: directive argument in the range [1, 2147483647] 59 | sprintf( buff, "%c%4d ", chain_id, i+1 ); | ^~~~ In file included from /usr/include/stdio.h:867, from /usr/include/c++/9/cstdio:42, from XYZ.h:2, from Backbone_Sidechain.h:2, from PDB_Residue.h:2, from PDB_Chain.cpp:1: /usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘_builtin
sprintf_chk’ output between 7 and 13 bytes into a destination of size 7 36 | return builtin___sprintf_chk (s, USE_FORTIFY_LEVEL - 1, | ~~~~~~^~~~~~~~ 37 | bos (s), fmt, __va_arg_pack ()); | ~~~~~~~~~ g++ -O3 -c PDB_Chain_Fold.cpp
g++ -O3 -c PDB_File.cpp g++ -O3 -c PhiPsi_Trans.cpp g++ -O3 -c XYZ_DBT.cpp g++ -O3 -c XYZ.cpp g++ -O3 -c Ligand_Utility.cpp g++ -O3 -o LIG_Tool Utility.o Computation_Utility.o Confo_Back.o Confo_Beta.o Confo_Lett.o Acc_Surface.o getopt.o Hydro_Bond.o LIG_Tool.o Mol_File.o Mol_Ori.o Mol_Out.o PDB_Utility.o Backbone_Sidechain.o PDB_Residue.o PDB_Chain.o PDB_Chain_Fold.o PDB_File.o PhiPsi_Trans.o XYZ_DBT.o XYZ.o Ligand_Utility.o make[1]: Leaving directory './LIG_Tool/source_code/LIG_Tool_v1.01_src' mv ./LIG_Tool_src/LIG_Tool ../ rm -f ./LIG_Tool_src/
.o g++ ./util_src/Chemical_Component_Dictionary.cpp -O3 -o Chemical_Component_Dictionary g++ ./util_src/XYZ_ContResi.cpp -O3 -o XYZ_ContResi g++ ./util_src/PDB_To_XYZ.cpp -O3 -o PDB_To_XYZ g++ ./util_src/XYZ_To_PDB.cpp -O3 -o XYZ_To_PDB g++ ./util_src/XYZ_Gen_Feature.cpp -O3 -o XYZ_Gen_Feature g++ ./util_src/XYZ_DCCnDCA.cpp -O3 -o XYZ_DCCnDCA mkdir -p ../util mv Chemical_Component_Dictionary XYZ_ContResi PDB_To_XYZ XYZ_To_PDB XYZ_Gen_Feature XYZ_DCCnDCA ../util/

Any clue?

WangLiguo-kyrie commented 2 years ago

Same issues! Is there any solution?

Hedmak commented 3 months ago

Same issues! Is there any solution?

BJWiley233 commented 2 months ago

probably the way they are parsing the args. seems to break when you recompile with a new gcc/g++