It's a bug. It is an error in Jmol's reorganizing tensors read from that
PDB file (ANISOU records) when it does some atom deletion associated with
adding hydrogens. It is not localized to JavaScript. It has been around for
a long time, but another bug, which had prevented reading of those records
in PDB files, had hidden it.
In the currently released version, you will not be able to use set
pdbAddHydrogens with PDB files that contain ANISOU records. If you want to
get around it for now, use
load inline @{ load("myfile.pdb").replace("ANISOU","XXXXXX") }
until that fix is released (tomorrow, probably)
Bob
On Wed, Jun 11, 2014 at 10:20 AM, Vinushka Schalk <stefan.schal...@ncf.edu>
wrote:
> Hello,
>
> I have just updated to JSmol 14.0.17, and I have found myself unable to
> execute the script "set pdbaddhydrogens true" before loading a specific
> structure (2YJP) without JSmol crashing with the following error:
>
> "ERROR creating model: TypeError: f is undefined"
>
> Specifically, the following commands are executed:
>
> set pdbaddhydrogens;
> set antialiasDisplay;load /pdbuploads/2yjp-0/2yjp.pdb;slab off; spin off;
> trace off; set ambient 40; set specpower 40;select none; selectionHalos on;
>
> The output produced is as follows, on the first run (after the first run,
> the ETHANEDIOL and HOH calls do not show up):
>
> pdbAddHydrogens = true
> antialiasDisplay = true
> fetching http://www.rcsb.org/pdb/files/ligand/EDO.cif
> 1,2-ETHANEDIOL
> fetching http://www.rcsb.org/pdb/files/ligand/HOH.cif
> WATER
> File Error:ERROR creating model: TypeError: f is undefined
> script ERROR: ERROR creating model: TypeError: f is undefined
> ----
> load >> "/charmming/pdbuploads/admin/2yjp-0/2yjp.pdb" <<"
>
> 2yjp.pdb is 2YJP downloaded directly from PDB.org. The scripts I am
> including in my HTML are:
>
> " <script type="text/javascript"
> src="/charmming/js/jsmol/js/JSmolCore.js"></script>
> <script type="text/javascript"
> src="/charmming/js/jsmol/js/JSmolApplet.js"></script>
> <script type="text/javascript"
> src="/charmming/js/jsmol/js/JSmolApi.js"></script>
> <script type="text/javascript"
> src="/charmming/js/jsmol/js/j2sjmol.js"></script>
> <script type="text/javascript"
> src="/charmming/js/jsmol/js/JSmol.full.js"></script>
> <script type="text/javascript"
> src="/charmming/js/jsmol/js/JSmoljQueryExt.js"></script>
> "
>
> This error only seems to occur with structures similar to 2YJP, with metal
> ion ligands. I have tried 1YJP and 3TIM and they both get hydrogens
> generated without errors. I have tried a molecule with a ligand, 1ATL,
> which has the ligand OQI, and it had hydrogens added without error. I then
> tried to load 1CKU, which has iron-sulfur clusters, and I got the same
> error as before. I know 2YJP has a zinc ion ligand in its structure. Is
> this what is breaking pdbaddhydrogens?
>
> (Note: all of these structures were downloaded directly from PDB.org)
>
> Also, I have noticed that pdbaddhydrogens does not add hydrogens to water
> oxygens. Is this intended behavior?
>
> -Vinushka Schalk
>
>
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users