andrewsb8 / DROP

Dihedral Rotation Of Proteins
GNU General Public License v3.0
1 stars 0 forks source link

command line inputs are not working correctly in ```setDihedral``` #2

Closed andrewsb8 closed 8 months ago

andrewsb8 commented 9 months ago

Issue is related to identifying which dihedral needs to rotate (identifyDihedral). Different inputs lead to different results:

  1. ./drop -f setDihedral -a 159 -i example_files/ILE_conect_110.pdb -n 2

Output: args.res_number: 2, args.dih_type: 2 Expected output: args.res_number: 2, args.dih_type: phi

  1. ./drop -f setDihedral -a 159 -i example_files/ILE_conect_110.pdb -n 2 -d psi

Output: args.res_number: 2, args.dih_type: psi Writing single-structure xyz file. Completed XYZ structure generation. Filename: output.xyz.

In this case, from the output log file drop.log, the angle from -a is not recorded.

Number of dihedrals identified in structure: 4
Calculating initial dihedral angles.
Columns: Angle, Angle Type (phi, psi, etc), Residue Name, Residue>
-86.610730 phi ILE 2 0
165.397344 psi ILE 2 1
99.733809  ILE 2 2
-71.905838  ILE 2 3

Done reading structure file: example_files/ILE_conect_110.pdb

Found dihedral number: 1

Changing dihedral angle psi in residue number 2 by -165.397344 de>

Rotation complete. Please check the accuracy of the operation.
User input angle: 0.000000
Angle after rotation: -0.000000

In particular, some command line options are being completely overwritten.

andrewsb8 commented 9 months ago

Found a new one:

./drop -f setDihedral -n 2 -d phi -i example_files/GLY_connect_110.pdb -o output.pdb -e pdb -c 1 -a 159

Error: File extension for output not recognized.

The commonality between them all is that the input (-i) has to be first for it to work. For example:

/drop -f setDihedral -i example_files/ILE_conect_110.pdb -n 2 -d phi -a 159 -o output.pdb -e pdb -c 1

Writing single-structure pdb file.

The above example works fine.

andrewsb8 commented 9 months ago

Now error if angle has a decimal where the -d option adopts some garbage output.

brian@Research-2022:~/projects/DROP$ ./drop -f setDihedral -i example_files/ILE_conect_110.pdb -n 2 -d chi1 -a 103.2 -o output.pdb -e pdb

Error: dihedral angle chi1������Y@� in residue number 2 was not found.

brian@Research-2022:~/projects/DROP$ ./drop -f setDihedral -i example_files/ILE_conect_110.pdb -n 2 -d chi2 -a 103.2 -o output.pdb -e pdb

Error: dihedral angle chi2������Y@�Ӛ�� in residue number 2 was not found.`

The following works:

./drop -f setDihedral -i example_files/ILE_conect_110.pdb -n 2 -d phi -a 103.2 -o output.pdb -e pdb

Writing single-structure pdb file.
andrewsb8 commented 8 months ago

After d55aad1, it appears the first two comments have been resolved. But the third set of cases still apply junk output to -d. This happens ONLY in the case of -d chi1 and -d chi2. If backbone angles are passed to this option, the commands work.