Forwarding this to the XPLOR listing

Hi Charles,

Thanks for your response. I am testing this script with Ubiquitin PCS data
so I can share more details with you. I assigned the TM as resid 90 in the
PDB (though UBQ has 76 residues). The metal is part of a lanthanide tagged
to cysteine at position 57 in UBQ. I do have a section in the script that
generate PSF from the PDB (highlighted in yellow below). How do I modify
this to generate PSF for the metal? Your previous response suggests that
might fix the error below.
Here is the line in the PDB that indicates the TM ion and the metal
position was obtained from paramagpy after calculating the initial tensor:
*HETATM  671  TM  TM  A  90      23.479  13.625   5.342  1.00 0.00    TM*
However, this is the error I'm still getting when I run the script:
*SystemError: xplor-nih error: error reading restraint: selection string
 resid 90 and name TM  selects no atoms*

Here is part of my script if you could please take a look:


*## START - variables to change by end-user ##*initialPDB =
'1ubqH_S57C_Tm_updated_metalpos.pdb'
fastaSEQ = None
referencePDB = None

input_pcsFiles = ['PCS_UBQ_Tm_S75C.npc']  # list of files with experimental
PCS values
xplor_restraintFiles = [os.path.splitext(fn)[0] + ".xplor" for fn in
input_pcsFiles]
lanthanides = ['TM']  # list of lanthanide metals
initialTensors = [(37.116e-32, 14.692e-32)]  # list of tensors, specified
as tuple (Xax, Xrh)

metal_id = '90'  # sequence number/id for the metal in the PDB file
metal_name = 'TM'  # name of the metal ion in the PDB file

rigid_body = [(2,44), (61,76)]
secondary_structure = [(2,44), (61,71)]

numberOfStructures = 20

*## END - variables to change by end-user #*
def PCSvaluesToXplorRestraints(filename, metal_id, metal_name):
    """Convert PCS values to XPLOR-NIH restraints."""

    data = np.loadtxt(filename,
            dtype={'names': ('res', 'atom', 'PCS', 'dPCS'),
                   'formats': ('f4', 'U1', 'f4', 'f4')})

    basename = os.path.splitext(filename)[0]

    with open(f"{basename}.xplor", "w") as outfile:
        for pcs in data:
            res, atom, PCS, dPCS = pcs
            outstring = ('assign ( resid 500 and name 00 )\n'
                         '       ( resid 500 and name Z )\n'
                         '       ( resid 500 and name X )\n'
                         '       ( resid 500 and name Y )\n'
                         f'       ( resid {metal_id} and name {metal_name}
)\n'
                         f'       ( resid {res} and name {atom} )
{PCS:.5f}  {dPCS:.5f}\n')
            outfile.write(outstring)

*# TODO: make sure you use "HN" for the amide proton*
if initialPDB and fastaSEQ:
    print("ERROR: specify either a FASTA sequence or an initial PDB file")
    sys.exit(1)


*# convert output PCS files from Paramagpy to XPLOR-NIH restraint files*for
fn in input_pcsFiles:
    PCSvaluesToXplorRestraints(fn, metal_id, metal_name)


xplor.requireVersion("3.0")

(opts, args) = xplor.parseArguments(["quick"])

quick = False
for opt in opts:
    if opt[0]=="quick":  # specify -quick to just test that the script runs
        quick=True
        pass
    pass

if quick:
    numberOfStructures = 3
    pass


*# protocol module has many high-level helper functions.*import protocol


*# explicitly set random seed from environment
variable*protocol.initRandomSeed(3421)



*# ** annealing settings ** #*command = xplor.command
protocol.initParams("protein")


if fastaSEQ:
    basename = os.path.splitext(fastaSEQ)[0]

    if not os.path.exists(f"{basename}_extended.pdb"):

*        # generate PSF data from sequence and initialize the correct
parameters*        from psfGen import seqToPSF

        seqToPSF(fastaSEQ)


*        # generate a random extended structure with correct covalent
geometry*        protocol.genExtendedStructure(f"{basename}_extended.pdb")

        protocol.initParams("protein")

    initialPDB = f"{basename}_extended.pdb"

Thank you for your help!

Adedolapo Ojoawo
Postdoctoral Research Associate
Howard Hughes Med Inst./Brandeis Uni
Waltham, MA

On Wed, Nov 8, 2023 at 11:50 AM Charles Schwieters <[email protected]>
wrote:

>
> Hello Adedolapo--
>
> > I am trying to refine a protein structure using PCS restraints. I have
> the
> > experimental PCS and initial tensors obtained from paramagpy. I am using
> a
> > modified version of the refine.py script fromgb1_rdc but I am running
> into
> > some issues with the script. I would appreciate your help in
> troubleshooting
> > this.
> >
> > However, I got the error message below. The metal has a resid of 77 in
> the PDB
> > and the name is Tm. These are also defined in the script as:
> > metal_id = '77'  # sequence number/id for the metal in the PDB file
> > metal_name = 'Tm'  # name of the metal ion in the PDB file
> >
> > Traceback (most recent call last):
>
>  ...
>
> > SystemError: xplor-nih error: error reading restraint: selection string
> resid 77 and
> > name Tm  selects no atoms
>
> I would guess that the TM ion was not read from the input PDB- if it's
> in the PDB, then there is probably a warning in the output of the
> Xplor-NIH script about this. You probably want to generate a custom
> PSF, containing the Tm, anything it is ligated to, along with the
> protein system. If you supplies more details about the system I should
> be able to help further.
>
> best regards--
> Charles
>
>
>

########################################################################

To unsubscribe from the XPLOR-NIH list, click the following link:
http://list.nih.gov/cgi-bin/wa.exe?SUBED1=XPLOR-NIH&A=1

Reply via email to