On Mon, 24 Jan 2005, timothy driscoll wrote:

> I am building a Web page and I want to be able to 'silently' access
> structure files in the PDB
>
> does anyone know if there exists a method for doing this already?  I can
> see how to construct and call a specific 'Download/Display File' page
> from the PDB, and then I could strip the coordinates from that, but I
> doubt that is the best route.

Hi Timothy,

        You can access all of the PDB through their FTP site. Here is a
one liner that will fetch a PDB file assuming you have a file named
".netrc" in your home directory something like this

.netrc
-----------------------------
machine ftp.rcsb.org
login anonymous
password [EMAIL PROTECTED]
-----------------------------

script entry
-----------------------------
echo "get pub/pdb/data/structures/all/pdb/pdb$entry.ent.Z pdb$entry.ent.Z"
| ftp ftp.rcsb.org >& /dev/null
-----------------------------

(that is one line, and $entry is the 4 character code variable for the pdb
entry)

So what happens when you pipe that "get pub..." command to ftp, it looks
for the .netrc file, finds the machine your using, and uses your login and
pword (in this case anonymous, and your e-mail address), and runs the
command.

So what you need to do is create a cgi-script that will be run when the
user submits the request.

I have a script that fetches PDB entries that works like this at a UNIX
prompt

% getentry 1mjc

and it "silently" fetches the file from the PDB without even going to the
website. I don't see it very hard to jump to fetching it, then converting
to your DB entry, etc when the user enters the code at a prompt.

Albion

Albion E. Baucom
http://rna.ucsc.edu/albion


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to