rlabduke / reduce Goto Github PK
View Code? Open in Web Editor NEWReduce - tool for adding and correcting hydrogens in PDB files
License: Other
Reduce - tool for adding and correcting hydrogens in PDB files
License: Other
the reduce.py script calls reduce
but doesn't pass it's return value, see
https://github.com/rlabduke/reduce/blob/master/command_line/reduce.py#L20
So reduce
has sometimes return status 1, but phenix.reduce
always returns 0.
This change would be trivial to change, like this:
return subprocess.call(cmd + args)
...
sys.exit(run(sys.argv[1:]))
unless ignoring the status code is actually intentional - I can't be sure about it.
Dear reduce experts,
I'm trying to compile reduce on linux x86_64 using gcc from gnu/8.4.0. I did:
CXX=/usr/local/gnu/8.4.0/bin/gcc cmake -S reduce_src/ -B .
and
make
Here's the error I got:
[ 92%] Linking CXX shared module mmtbx_reduce_ext.so
/usr/local/cmake/3.17.2/bin/cmake -E cmake_link_script CMakeFiles/mmtbx_reduce_ext.dir/link.txt --verbose=1
/usr/local/gnu/8.4.0/bin/gcc -fPIC -shared -o mmtbx_reduce_ext.so CMakeFiles/mmtbx_reduce_ext.dir/reduce_bpl.cpp.o -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 libreducelib.a /usr/lib64/libboost_python-mt.so /usr/lib64/libpython2.7.so -lpdb++ -ltoolclasses
/usr/bin/ld: cannot find -lpdb++
/usr/bin/ld: cannot find -ltoolclasses
I have "libpdb++.a" and "libtoolclasses.a" in the two subdirectories. When I ran "cmake" and "make" for libpdb and toolclasses, I didn't see any error messages. However, I don't have root access on the HPC cluster I'm using.
Could you please give me some more guidance on the installation, without root access if possible? Thank you for your time and kind advice in advance.
Best,
Amy H
If a clique search is abandoned, ReturnCodeGlobal
gets set to ABANDONED_RC
(=1). This is later used as the return value of the main function. In these cases the program still finishes and the output is complete. However there are also several critical errors that cause an early exit of the program resulting in incomplete output that use the same return code via exit(1)
. It would be useful to be able to differentiate between these cases when running reduce from a script.
I am using Reduce v4.7 to add hydrogen atoms to PDB files. In some of the files, residues in protein chains are not numbered from 1, but from some larger integer. I am aware of the reasons why such residue numbering is used, but I still would like to have each initial residue of each protein chain to be protonated as N-terminal. Is there a way to do so?
Dear reduce experts,
I'm trying to convert a united-atom protein structure into an all-atom structure using reduce. The command I use is:
reduce input.pdb -NOFLIP -Keep -DB reduce_wwPDB_het_dict.txt > output.pdb
In the input pdb structure, I have histidine residues in different forms, including the (delta-protonated), HIE (epsilon-protonated) and HIP (doubly-protonated) philistines. Although the N-epsilon hydrogens (HE2) are given in the input structure, all are turned into the HID form in the output structure.
I wonder if there's an option to keep the original form of the histidine residues in the given structure, or, if I have to enforce it by using a modified het_dict.txt and different residue names.
Any comments or suggestions would be greatly appreciated.
Massive Thanks,
Amy
Hi,
I'm currently just interested in getting some reproducible protein surface representations and I was wondering what the order of processing of pdb files are. This is not too clear on the git repo starting from a pdb file.
Seems like the order of pre-processing is:
-- in data_preprocessing
protonate pdb,
get the protein chains we are interested in
convert to npy
After that I am assuming that the outputs go to geometry_preprocessing but not sure about what is going on. I'm not currently interested in training any kind of model but just getting a good representation of the protein surface (shape and chemical properties).
Thanks,
Hello,
I'm trying to run Reduce on a bunch PDB files that contain a ligand in a pocket. Some of the ligands don't exist in the het_dict so I've been making fake CONECT databases to provide to Reduce. After running Reduce on some of these files, I've noticed that sometimes some hydrogens are duplicated / repeated in the output file. I think I set up the CONECT database right, but I'm not sure what is causing this issue.
I've attached one example where there is the ligand in a pocket (1b1h_pocket_ligand.txt) that I run Reduce on using the database (1b1h_reduce_conect.txt) to get the output (1b1h_pocket_ligand_reduce.txt). In that output, there are a number of duplicated hydrogens, specifically H22, H24, H35, H36, and H37.
1b1h_pocket_ligand.txt
1b1h_pocket_ligand_reduce.txt
1b1h_reduce_conect.txt
Any insight regarding this would be greatly appreciated!
Nick
When calculating the dihedral rotangle
for a flip in RotHingeDock_Flip
in FlipMemo.cpp
(line 650) the rotangle
can be NaN
as a result of floating point accuracy issues. This then leads to all coordinates rotated by this angle to be invalid.
The underlying issue is found in the dihedral
function in toolclasses/Point3d.cpp
. In this function dot(d, e)/(dmag*emag)
may not be exactly in the range from -1 to 1 due to floating point accuracy problems leading the following acos
call to return NaN
. Clamping the result of the division to this range would fix this problem. The same applies to dot(f, e)/(fmag*emag)
later in that function.
This issue can be observed with PDB ID 3VI2, chain A, GLN 312.
I installed reduce
on a Linux machine where I don't have sudo privileges. The workaround I found was to manually modify the paths in reduce/reduce_src/Makefile
, and add them to PATH in the .bashrc
file. Then I run make install
and the binary file was placed in my home directory, in the folder that I manually typed in the Makefile.
The usual bypass for the sudo is by providing a prefix at configure time, or possibly also as a parameter to the make commands, but the ./configure
file is not present in the repo. It would be useful (and also a good practice) to include the option of having a prefix for the installation, instead of hard-coding the absolute path to the code.
An error will be reported after adding:
WARNING: overwriting environment variables set in the machine
overwriting variable PATH
There is a crash in RotMethyl
if the rotation is applied to records with invalidated atoms. The crash happens in scoreThisAngle()
when it tries to access *(_bnded[i])
. This function iterates over all records in this rotation unconditionally and increments i
with each iteration. _bnded
however when constructed in finalize()
may not contain entries for records with invalidated atoms, because of the valid()
check. In such cases there are fewer entries in _bnded
than there are records which means that _bnded[i]
is an invalid memory access for the last record (or earlier if there are more invalidated atoms). Maybe the same valid()
check as in finalize()
needs to be used in the loop here as well such that _bnded[i]
is only accessed and i
only increased for valid atoms. The check got added to finalize()
in commit 2485906.
The crash can be observed with PDB ID 1QIR
Dear reduce experts,
My apologies for the multiple posts about using reduce.. I'm using reduce to process a protein-ligand complex which contains a ligand called "P01" and a non-standard residue called "EPI". I have added these two custom het groups to my het_dict.txt. my_het_dict.txt
In the standard error output I got warning messages like this:
Processing file: "P01_structure.pdb.for_reduce"
WARNING: atom C4 from P01 will be treated as carbon
WARNING: atom C5 from P01 will be treated as carbon
WARNING: atom C6 from P01 will be treated as carbon
WARNING: atom C7 from P01 will be treated as carbon
WARNING: atom C8 from P01 will be treated as carbon
WARNING: atom N9 from P01 will be treated as carbon
WARNING: atom C3 from P01 will be treated as carbon
WARNING: atom N2 from P01 will be treated as carbon
WARNING: atom O1 from P01 will be treated as carbon
Building or keeping OH & SH Hydrogens.
WARNING: atom HT11 from EPI will be treated as hydrogen
WARNING: atom HT11 from EPI will be treated as hydrogen
WARNING: atom HT12 from EPI will be treated as hydrogen
WARNING: atom HT13 from EPI will be treated as hydrogen
WARNING: atom HT12 from EPI will be treated as hydrogen
WARNING: atom HT11 from EPI will be treated as hydrogen
WARNING: atom HT12 from EPI will be treated as hydrogen
WARNING: atom HT13 from EPI will be treated as hydrogen
WARNING: atom HT13 from EPI will be treated as hydrogen
WARNING: atom HT11 from EPI will be treated as hydrogen
WARNING: atom HT12 from EPI will be treated as hydrogen
WARNING: atom HT13 from EPI will be treated as hydrogen
WARNING: atom HT21 from EPI will be treated as hydrogen
WARNING: atom HT21 from EPI will be treated as hydrogen
WARNING: atom HT22 from EPI will be treated as hydrogen
WARNING: atom HT23 from EPI will be treated as hydrogen
WARNING: atom HT22 from EPI will be treated as hydrogen
WARNING: atom HT21 from EPI will be treated as hydrogen
The output pdb structure looks fine to me, and the hydrogen are added to reasonable positions. But I still wonder is such warning normal for custom het groups? Or is it because of the atom names?
Thank you for your time and kind advice in advance!
Many Thanks,
Amy
Hi, my environment is ubuntu 20.04
i encounter a problem while "sudo make install" command.
Terminal shows these text and stops installing.
"gunzip -c -d ../reduce_wwPDB_het_dict.txt.gz > /usr/local/reduce_wwPDB_het_dict.txt
gzip: ../reduce_wwPDB_het_dict.txt.gz: No such file or directory"
Is there any solve?
Tom is getting a crash (after running for about six hours) in reduce when he issues the following command:
phenix.refine 3kz4_biomt.pdb 3kz4-sf.mtz \
refinement.main.number_of_macro_cycles=0 \
refinement.main.nqh_flips=False
This is the command-line argument causing the crash: molprobity.reduce -oh -his -flip -keep -allalt -limit120 -pen9999 -
The crash dumps the stdin file to reduce_fail.pdb. When he runs the command line directly, feeding it the name of the input file rather than feeding the file from standard input, reduce finishes in minutes and does not crash.
Note1: Reduce behaves differently when run on a file from stdin than when run with a filename, so that may be the difference.
Note2: I've fixed a number of crash bugs in Reduce recently, which may not be in the Phenix version yet, that may be causing this.
Reduce replaces "0" sigma values in SIGUIJ records with blanks in its output. Biopython crashes when parsing such Reduce outputs, because it expects an integer value. The difference between the format expected by Biopython and the one produced by Reduce seems to stem from an ambiguity in the PDB specification. The specification states that "SIGUIJ are listed only if they have been provided by the depositor and only if they are not zero". This could be interpreted in two ways, either to omit SIGUIJ records if all sigma values in the record are 0 or to omit individual values if they are 0. A search through all structures in the PDB shows only nine structures containing SIGUIJ records. Six of these structures use "0" [1] whereas no structure uses blanks. The remaining three structures have no sigma values of 0. This points towards the interpretation used by Biopython to be the intended one. To change Reduce to follow this interpretation, all occurrences of %7D in the "SIGUIJ" format string in libpdb/write_format.i would need to be changed to %7d.
[1] 1etl, 1etm, 1etn, 1luq, 2i16, 2i17; the last two also contain SIGUIJ records consisting entirely of 0 values, going against both interpretations of the specification
Dear all,
Thank you for developing the great package.
Currently, to install the latest version it seems that using make is the only option.
However, are there any plans to make it possible to install via conda or OS package managers?
Best,
thanks for making this software available! I am in the process of adding the package to MacPorts and would like to clarify the license as it's not completely clear to me which is the intended license. Can you tell me which of the SPDX licenses (or something else) you intend to use? Thanks!
Dear reduce experts,
I have a real quick question about the residue names for custom het groups: Are there are any "reserved" residue names that can not be used for new residues/ligands? In my het_dict.txt, I tried two names for exactly the same ligand compound: "P01" worked, but "PCA" didn't work. Here's my het_dict.txt:
my_het_dict.txt
With "PCA", the program would skip and not add hydrogens to the ligand, while I didn't see any error messages for unable to recognize the ligand. I was thinking "PCA" might be a reserved name for a more common residue, and I wonder if there are any more "reserved" names like this. I will be more careful and try to avoid using such names for custom het groups.
Thank you for your time and kind advice in advance!
Many Thanks,
Amy
Pasting from Bradley to get it logged in the system:
I am not sure how big of deal this is but I noticed when developing my reduce test that when doing a flip on GLN, and presumably ASN, the atom records change but not the element column. This means the N has an O in the element column and vise versa. We ought to fix this and I assume its easy but don't know my way around the reduce code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.