From: Bryan Roessler (roessler_at_uab.edu)
Date: Fri Feb 02 2018 - 14:04:43 CST

Hello João,

I want to first let you know that I was able to build the psf correctly
using psfgen instead of autopsf, using:

package require psfgen
mkdir -p psfgen_output
mol load pdb test_fragment_short.pdb
set seg1 [atomselect top "resid 701 to 705"]
rm -f psfgen_output/seg1_temp.pdb
$seg1 writepdb psfgen_output/seg1_temp.pdb
resetpsf
psfcontext reset
topology ../0-forcefields/top_all36_prot.rtf
topology phq_b27.top
segment PEP {pdb psfgen_output/seg1_temp.pdb; first NONE; last NONE}
coordpdb psfgen_output/seg1_temp.pdb PEP
guesscoord
writepsf psfgen_output/seg1.psf
writepdb psfgen_output/seg1.pdb
mol load psf psfgen_output/seg1.psf pdb psfgen_output/seg1.pdb

So I will move on with using psfgen from here on out but maybe you will be
able to discover the problem in autopsf.

test_fragment_short.pdb:

> CRYST1 1.000 1.000 1.000 90.00 90.00 90.00 P 1 1
> ATOM 11 C1 PHQ B 701 -5.102 2.813 11.450 1.00
> 0.00 C
> ATOM 12 O1 PHQ B 701 -5.041 3.705 10.633 1.00
> 0.00 O
> ATOM 13 O2 PHQ B 701 -5.524 3.109 12.647 1.00
> 0.00 O
> ATOM 14 C2 PHQ B 701 -6.588 4.118 12.908 1.00
> 0.00 C
> ATOM 15 CG PHQ B 701 -7.916 3.418 13.074 1.00
> 0.00 C
> ATOM 16 CD2 PHQ B 701 -8.606 2.953 11.949 1.00
> 0.00 C
> ATOM 17 CE2 PHQ B 701 -9.836 2.303 12.100 1.00
> 0.00 C
> ATOM 18 CZ PHQ B 701 -10.377 2.119 13.377 1.00
> 0.00 C
> ATOM 19 CE1 PHQ B 701 -9.688 2.584 14.503 1.00
> 0.00 C
> ATOM 20 CD1 PHQ B 701 -8.456 3.234 14.352 1.00
> 0.00 C
> ATOM 21 H21 PHQ B 701 -6.644 4.806 12.078 1.00
> 0.00 H
> ATOM 22 H22 PHQ B 701 -6.353 4.662 13.811 1.00
> 0.00 H
> ATOM 23 HD2 PHQ B 701 -8.188 3.094 10.964 1.00
> 0.00 H
> ATOM 24 HE2 PHQ B 701 -10.368 1.944 11.230 1.00
> 0.00 H
> ATOM 25 HZ PHQ B 701 -11.326 1.615 13.495 1.00
> 0.00 H
> ATOM 26 HE1 PHQ B 701 -10.105 2.442 15.489 1.00
> 0.00 H
> ATOM 27 HD1 PHQ B 701 -7.925 3.593 15.222 1.00
> 0.00 H
> ATOM 28 N LEU B 702 -4.751 1.592 11.149 1.00
> 0.00 N
> ATOM 29 CA LEU B 702 -4.261 1.257 9.779 1.00
> 0.00 C
> ATOM 30 C LEU B 702 -5.192 1.877 8.720 1.00
> 0.00 C
> ATOM 31 O LEU B 702 -6.357 1.541 8.659 1.00
> 0.00 O
> ATOM 32 CB LEU B 702 -4.254 -0.264 9.592 1.00
> 0.00 C
> ATOM 33 CG LEU B 702 -4.481 -0.972 10.933 1.00
> 0.00 C
> ATOM 34 CD1 LEU B 702 -5.952 -0.859 11.346 1.00
> 0.00 C
> ATOM 35 CD2 LEU B 702 -4.100 -2.446 10.786 1.00
> 0.00 C
> ATOM 36 H LEU B 702 -4.806 0.894 11.830 1.00
> 0.00 H
> ATOM 37 HA LEU B 702 -3.258 1.628 9.661 1.00
> 0.00 H
> ATOM 38 HB2 LEU B 702 -5.031 -0.546 8.897 1.00
> 0.00 H
> ATOM 39 HB3 LEU B 702 -3.302 -0.565 9.193 1.00
> 0.00 H
> ATOM 40 HG LEU B 702 -3.861 -0.521 11.694 1.00
> 0.00 H
> ATOM 41 HD11 LEU B 702 -6.526 -0.417 10.545 1.00
> 0.00 H
> ATOM 42 HD12 LEU B 702 -6.032 -0.242 12.224 1.00
> 0.00 H
> ATOM 43 HD13 LEU B 702 -6.336 -1.841 11.562 1.00
> 0.00 H
> ATOM 44 HD21 LEU B 702 -4.364 -2.787 9.795 1.00
> 0.00 H
> ATOM 45 HD22 LEU B 702 -4.630 -3.031 11.523 1.00
> 0.00 H
> ATOM 46 HD23 LEU B 702 -3.034 -2.558 10.931 1.00
> 0.00 H
> ATOM 47 N PRO B 703 -4.692 2.762 7.877 1.00
> 0.00 N
> ATOM 48 CA PRO B 703 -5.523 3.393 6.809 1.00
> 0.00 C
> ATOM 49 C PRO B 703 -6.269 2.345 5.978 1.00
> 0.00 C
> ATOM 50 O PRO B 703 -6.439 1.217 6.393 1.00
> 0.00 O
> ATOM 51 CB PRO B 703 -4.517 4.137 5.929 1.00
> 0.00 C
> ATOM 52 CG PRO B 703 -3.297 4.333 6.763 1.00
> 0.00 C
> ATOM 53 CD PRO B 703 -3.305 3.259 7.851 1.00
> 0.00 C
> ATOM 54 HA PRO B 703 -6.217 4.097 7.236 1.00
> 0.00 H
> ATOM 55 HB2 PRO B 703 -4.280 3.546 5.054 1.00
> 0.00 H
> ATOM 56 HB3 PRO B 703 -4.919 5.093 5.636 1.00
> 0.00 H
> ATOM 57 HG2 PRO B 703 -2.414 4.231 6.147 1.00
> 0.00 H
> ATOM 58 HG3 PRO B 703 -3.317 5.310 7.219 1.00
> 0.00 H
> ATOM 59 HD2 PRO B 703 -2.619 2.462 7.598 1.00
> 0.00 H
> ATOM 60 HD3 PRO B 703 -3.047 3.694 8.805 1.00
> 0.00 H
> ATOM 61 N ALA B 704 -6.713 2.703 4.804 1.00
> 0.00 N
> ATOM 62 CA ALA B 704 -7.442 1.717 3.960 1.00
> 0.00 C
> ATOM 63 C ALA B 704 -8.555 1.077 4.789 1.00
> 0.00 C
> ATOM 64 O ALA B 704 -8.323 0.165 5.558 1.00
> 0.00 O
> ATOM 65 CB ALA B 704 -6.472 0.634 3.490 1.00
> 0.00 C
> ATOM 66 H ALA B 704 -6.567 3.616 4.479 1.00
> 0.00 H
> ATOM 67 HA ALA B 704 -7.869 2.217 3.103 1.00
> 0.00 H
> ATOM 68 HB1 ALA B 704 -6.016 0.939 2.561 1.00
> 0.00 H
> ATOM 69 HB2 ALA B 704 -7.009 -0.291 3.340 1.00
> 0.00 H
> ATOM 70 HB3 ALA B 704 -5.706 0.488 4.238 1.00
> 0.00 H
> ATOM 71 N B27 B 705 -9.759 1.553 4.646 1.00
> 0.00 N
> ATOM 72 CA B27 B 705 -10.885 0.977 5.433 1.00
> 0.00 C
> ATOM 73 CB B27 B 705 -12.110 1.889 5.302 1.00
> 0.00 C
> ATOM 74 CG2 B27 B 705 -12.984 1.757 6.550 1.00
> 0.00 C
> ATOM 75 OG1 B27 B 705 -11.678 3.236 5.170 1.00
> 0.00 O
> ATOM 76 SG B27 B 705 -10.484 -0.653 3.274 1.00
> 0.00 S
> ATOM 77 CX B27 B 705 -11.212 -0.428 4.917 1.00
> 0.00 C
> ATOM 78 HN B27 B 705 -9.922 2.293 4.025 1.00
> 0.00 H
> ATOM 79 HA B27 B 705 -10.597 0.915 6.472 1.00
> 0.00 H
> ATOM 80 HB B27 B 705 -12.684 1.611 4.431 1.00
> 0.00 H
> ATOM 81 HG1 B27 B 705 -10.864 3.237 4.662 1.00
> 0.00 H
> ATOM 82 HG21 B27 B 705 -12.929 0.746 6.924 1.00
> 0.00 H
> ATOM 83 HG22 B27 B 705 -14.007 1.993 6.300 1.00
> 0.00 H
> ATOM 84 HG23 B27 B 705 -12.632 2.440 7.308 1.00
> 0.00 H
> ATOM 85 HX1 B27 B 705 -12.282 -0.558 4.859 1.00
> 0.00 H
> ATOM 86 HX2 B27 B 705 -10.799 -1.162 5.593 1.00
> 0.00 H
> END
>

Thanks,
Bryan

*Bryan Roessler | Researcher*
UAB | The University of Alabama at Birmingham
*uab.edu/cmdb <http://uab.edu/cmdb>*
Knowledge that will change your world

On Fri, Feb 2, 2018 at 10:18 AM, João Ribeiro Illinois <
jribeiro_at_illinois.edu> wrote:

> Dear Bryan,
>
> Could you please send us the structure for us to test and see what is the
> source of the misplaced residues?
>
> Best
> João
>
> On Fri, Feb 2, 2018 at 12:12 shoppingfilter3024_at_gmail.com <
> shoppingfilter3024_at_gmail.com> wrote:
>
>> Autopsf divides your system into segments, with every protein chain or
>>> nucleic acid strand ending up in separate segments. I guess that your
>>> nonstandard residues make up another segment and this results in reordering.
>>> I an not sure if this is done by residue names or by checking if an atom
>>> belongs to ATOM or HETATM records.
>>>
>>> You may try a few things:
>>>
>>> - if you use the Automatic PSF builder GUI, at Step 3 you can delete
>>> the wrong segment with 701 and 705 and edit the first one to include your
>>> entire peptide.
>>> - alternatively, try to change the first 6 characters of the ATOM
>>> and HETATM lines in your PDB file to be all ATOM or all HETATM.
>>> - if neither of the above works, you could try to fool autopsf by
>>> renaming residues, but this would need to be done both in PDB and topology
>>> files. There should be an easier way, though.
>>>
>>> HTH,
>>>
>>> Pawel
>>>
>> Hi Pawel,
>>
>> The nonstandard residues do not belong to a different segment, although
>> as you surmised autopsf guesses them incorrectly, and I fix them manually.
>> There is also another segment (which I do not include at this point for
>> purposes of troubleshooting) that is eventually patched to residue 705 via
>> a disulfide bond. The patching works as expected.
>>
>> All of the atoms are labeled as ATOM in the PDB.
>>
>> I'm not really keen on renaming residues at this point since I've been
>> down that road before and everything becomes unnecessarily confusing,
>> especially when I re-audit my protocol.
>>
>>
>> Dear Bryan,
>>>
>>> autopsf has a hard-coded definition of protein and will separate the
>>> protein residues from the rest as Pawel mentioned. There is although a
>>> possibility in the code that was added specifically for QwikMD.
>>>
>>> QwikMD uses four different atom macros definitions: "qwikmd_protein",
>>> "qwikmd_nucleic", "qwikmd_glycan" and "qwikmd_lipid" for cases like yours.
>>> You might want to try using these macros to include your residues as
>>> protein residues such as:
>>>
>>> set proteinmcr "protein or (resid 701 705)"; # you might want to add the
>>> residue names as well.
>>> atomselect macro qwikmd_protein $proteinmcr
>>>
>>> And then call autopsf by command line with the "-qwikmd".
>>>
>>> In the lastest VMD version, 1.9.4a, the pdb alias commands are not
>>> performed if autopsf is called using "-qwikmd".
>>>
>>> Again, this was meant to be used by QwikMD, but let me know if it works
>>> for you. If this is something desirable to be accessible for general use,
>>> we might implement an easier way to change the definitions of the different
>>> molecules.
>>>
>>> I hope this helps
>>>
>>> Best
>>>
>>> João Ribeiro
>>>
>>
>> Hi João,
>>
>> Using the qwikmd workaround does have some effect, although it is not
>> exactly as anticipated. I have tried using the atomselection you suggested
>> and also including the entire fragment (i.e. resid 701 to 705) but this
>> results in the resids being numbered 701, 705, 702, 703, 704 which results
>> in the same incorrect bond. I'm not entirely sure how qwikmd works or what
>> it would take to number the resids appropriately, but it is at least
>> reassuring that there is a mechanism to alter the autogenerated pdb.
>>
>> Thanks to you both,
>> Bryan
>>
>>
>> *Bryan Roessler | Researcher *
>> UAB | The University of Alabama at Birmingham
>> *uab.edu/cmdb
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__uab.edu_cmdb&d=DwMDaQ&c=OCIEmEwdEq_aNlsP4fF3gFqSN-E3mlr2t9JcDdfOZag&r=JBqQLS7jZ5whrB0hXJY8MNYcfDrh8UhlGJ2ANxoi8s0&m=MWqDmc9qYi_lz-dt6UYXfnEzr8mKuUB9i7kUPTCtKcA&s=TJdP91HE_UJ4U_U3XMVFUlYMjt0rfA3lDmFq4gmdC5g&e=>*
>> Knowledge that will change your world
>>
> --
> ……………………………………………………...
> João Vieira Ribeiro
> Theoretical and Computational Biophysics Group
> Beckman Institute, University of Illinois
> jribeiro_at_ks.uiuc.edu
> +1 (217) 3005851
>