Jmol MediaWiki Extension

Jmol MediaWiki Extension is a piece of php code that runs whenever the Wiki renderer finds the jmol tags. With it it is possible to show a Jmol Applet in a Wiki page.

As it is now it only accepts Folding@Home proteins. Using it is very simple. Place the tags in a Wiki page. Inside the tags put the contents of the current.xyz file corresponding to the protein you want it to show.

Open the current.xyz file in a text editor, copy everything and paste inside the tags:

 

Bulding an extension is explained here:

http://meta.wikimedia.org/wiki/Writing_your_own_MediaWiki_extension

This is the second version, written by NicoV, with a XML parser. With the new XML parser it is possible to pass parameters to the Jmol Applet. To see how this page examples were set open the page for edition but do not save it. Copy to the sandbox to experiment.

The parameters that can be passed to the Jmol Applet are the following:

 

In addition, you can also create buttons to send scripts to the applet.

 

The source code of the extension (an updated description and version can be found here) :

 

Example with buttons
set spin X 10; spin on FahWiki  gray 215	p729_gsgs_md 1	N	23.228223	5.654658	29.115329	2	213	214	215 2	HT1	23.823481	6.503227	29.200187	1 3	C	19.245783	-6.401303	27.509863	4	5	10 4	OT2	19.498501	-6.555715	28.703682	3 5	OT1	18.953258	-7.363219	26.801302	3 6	OG1	20.426128	-3.260700	27.428269	7	8 7	HG1	20.967400	-2.595135	26.997395	6 8	CB	19.992623	-4.204704	26.460109	9	6	10 9	CG2	19.543694	-3.412632	25.242944	8 10	CA	18.816779	-5.062813	26.931226	3	8	11 11	N	17.879385	-4.346771	27.774501	10	12	13 12	H	18.305610	-3.940411	28.557847	11 13	C	16.604300	-4.405452	27.400773	11	14	24 14	O	16.282181	-4.898720	26.321020	13 15	OH	16.762997	-8.932446	31.593220	16	17 16	HH	17.279707	-9.534497	31.052694	15 17	CZ	16.106888	-7.989850	30.828021	15	18	20 18	CE2	15.873219	-8.168663	29.479711	17	19 19	CD2	15.186324	-7.191725	28.788159	18	22 20	CE1	15.678475	-6.811911	31.405458	17	21 21	CD1	15.113502	-5.751907	30.725987	20	22 22	CG	14.858934	-5.994515	29.391506	19	21	23 23	CB	14.409533	-4.804125	28.559926	22	24 24	CA	15.552034	-3.827539	28.333108	13	23	25 25	N	14.946280	-2.655763	27.730956	24	26	27 26	H	14.041140	-2.760839	27.370224	25 27	C	15.490679	-1.449302	27.600207	25	28	33 28	O	16.658118	-1.308827	27.961245	27 29	CG1	16.201445	-0.341858	24.693859	30	31 30	CD	16.618104	-1.184804	23.474247	29 31	CB	14.825517	-0.638224	25.267823	29	32	33 32	CG2	13.782337	0.176412	24.520442	31 33	CA	14.705551	-0.438643	26.780031	27	31	34 34	N	14.948556	0.949407	27.121890	33	35	36 35	H	15.453194	1.519563	26.504872	34 36	C	14.367898	1.483392	28.192732	34	37	46 37	O	13.426751	0.875181	28.699975	36 38	NZ	13.067338	1.553658	33.285370	39	40	41	42 39	HZ3	12.769083	1.594811	32.289903	38 40	HZ2	13.803115	0.831013	33.419638	38 41	HZ1	12.218248	1.337526	33.845665	38 42	CE	13.374395	2.964526	33.418283	38	43 43	CD	14.512751	3.292014	32.465763	42	44 44	CG	13.990878	3.241056	31.039066	43	45 45	CB	15.071461	3.154193	29.973598	44	46 46	CA	14.727497	2.925637	28.510752	36	45	47 47	N	13.574281	3.697481	28.090110	46	48	49 48	H	12.763890	3.298286	28.470061	47 49	C	13.598843	4.720348	27.240300	47	50	55 50	O	14.727237	5.003838	26.841125	49 51	OG1	11.118355	5.976810	25.059249	52	53 52	HG1	10.712451	5.764577	24.215565	51 53	CB	11.899562	4.877439	25.503693	54	51	55 54	CG2	11.223924	3.522078	25.633936	53 55	CA	12.474891	5.602691	26.721883	49	53	56 56	N	12.983547	6.940650	26.490026	55	57	58 57	H	12.952526	7.266603	25.566308	56 58	C	13.228050	7.808211	27.468081	56	59	63 59	O	12.942547	7.538487	28.633726	58 60	OG	13.192097	11.390059	26.355369	61	62 61	HG	13.979187	11.683110	26.820362	60 62	CB	12.683692	10.199982	26.939881	60	63 63	CA	13.793505	9.182529	27.148609	58	62	64 64	N	14.542396	9.127844	25.908148	63	65	66 65	H	14.018258	9.240528	25.087776	64 66	C	15.872071	9.157667	25.914841	64	67	68 67	O	16.427840	9.265085	27.006867	66 68	CA	16.771169	9.032171	24.695685	66	69 69	N	17.462946	7.757820	24.690897	68	70	71 70	H	18.367807	7.809848	25.063663	69 71	C	16.865790	6.612214	24.374709	69	72	79 72	O	15.746350	6.642111	23.865855	71 73	ND2	15.084922	3.269751	23.214381	74	75	76 74	HD22	14.370297	2.630281	23.416343	73 75	HD21	15.056584	3.858787	22.431664	73 76	CG	16.154022	3.350442	24.001448	73	77	78 77	OD1	16.167835	2.715538	25.054848	76 78	CB	17.337083	4.217072	23.601711	76	79 79	CA	17.701241	5.353569	24.543111	71	78	80 80	N	17.635955	4.834116	25.895329	79	81	82 81	H	16.803280	4.421640	26.206698	80 82	C	18.602430	5.096395	26.770604	80	83	91 83	O	19.525272	5.835341	26.431088	82 84	NE2	15.618290	6.595560	28.999028	85	86	87 85	HE22	14.824076	6.732081	29.556687	84 86	HE21	15.616579	6.324974	28.057120	84 87	CD	16.687268	6.905189	29.727278	84	88	89 88	OE1	16.617962	7.089211	30.941467	87 89	CG	18.081448	6.984249	29.126899	87	90 90	CB	18.799475	5.650356	29.251723	89	91 91	CA	18.438689	4.611908	28.202012	82	90	92 92	N	19.162210	3.378484	28.442290	91	93	94 93	H	20.049570	3.370449	28.858166	92 94	C	18.651296	2.233739	27.997930	92	95	105 95	O	17.517501	2.012916	27.575226	94 96	OH	22.959061	3.241555	23.452513	97	98 97	HH	23.874688	3.171953	23.732517	96 98	CZ	22.256293	2.555718	24.422152	96	99	101 99	CE2	22.729692	2.370529	25.705147	98	100 100	CD2	21.970739	1.601684	26.563811	99	103 101	CE1	21.040311	2.028582	24.037490	98	102 102	CD1	20.315444	1.180658	24.849920	101	103 103	CG	20.782766	1.041055	26.140878	100	102	104 104	CB	20.016489	0.250870	27.189155	103	105 105	CA	19.584153	1.095073	28.376935	94	104	106 106	N	18.871372	0.145276	29.209011	105	107	108 107	H	18.582042	-0.754968	28.951612	106 108	C	18.741674	0.445924	30.498073	106	109	121 109	O	19.318067	1.386264	31.042535	108 110	CZ3	12.808691	-1.695926	30.850589	111	116 111	CH2	12.175292	-2.195956	31.970057	110	112 112	CZ2	12.868119	-2.338015	33.155065	111	117 113	NE1	14.680567	-1.454058	34.338777	114	115	117 114	HE1	14.325565	-1.733349	35.208488	113 115	CD1	15.722926	-0.723200	34.051757	113	119 116	CE3	14.117408	-1.262261	30.910890	110	118 117	CE2	14.175045	-1.896266	33.190796	112	113	118 118	CD2	14.830728	-1.394896	32.084808	116	117	119 119	CG	15.811573	-0.626403	32.677994	115	118	120 120	CB	16.898078	0.284595	32.130196	119	121 121	CA	17.823255	-0.518621	31.230578	108	120	122 122	N	18.457896	-1.423927	32.168753	121	123	124 123	H	18.587245	-1.079372	33.077030	122 124	C	18.588325	-2.724790	31.924496	122	125	134 125	O	18.394657	-3.111278	30.772955	124 126	NZ	21.473293	-9.190027	33.823190	127	128	129	130 127	HZ3	21.591961	-9.820147	34.642007	126 128	HZ2	20.586340	-9.449006	33.345871	126 129	HZ1	22.260108	-9.447798	33.193839	126 130	CE	21.265650	-7.777756	34.077899	126	131 131	CD	21.061623	-6.913431	32.844322	130	132 132	CG	20.619061	-5.615656	33.500311	131	133 133	CB	20.028527	-4.680609	32.457547	132	134 134	CA	19.073490	-3.646666	33.031385	124	133	135 135	N	17.979375	-4.392553	33.622241	134	136	137 136	H	17.649608	-5.183616	33.146951	135 137	C	17.347960	-3.994434	34.723058	135	138	143 138	O	17.501446	-2.922719	35.306866	137 139	OG1	15.078741	-3.496887	36.704333	140	141 140	HG1	15.945042	-3.262408	37.045169	139 141	CB	14.960467	-4.394766	35.610602	142	139	143 142	CG2	13.868726	-5.407539	35.915277	141 143	CA	16.346717	-4.971850	35.316920	137	141	144 144	N	16.838474	-5.537850	36.558037	143	145	146 145	H	16.492329	-5.036252	37.325506	144 146	C	17.698492	-6.550815	36.614950	144	147	151 147	O	18.214550	-7.073498	35.628331	146 148	OG	16.165560	-8.189448	38.659830	149	150 149	HG	15.720350	-8.942243	39.055672	148 150	CB	17.545687	-8.376408	38.382876	148	151 151	CA	18.183364	-7.062505	37.961621	146	150	152 152	N	17.926794	-5.993046	38.906589	151	153	154 153	H	17.045394	-5.565197	38.884265	152 154	C	18.934898	-5.574803	39.666679	152	155	156 155	O	20.095420	-5.981969	39.684992	154 156	CA	18.459623	-4.391098	40.493360	154	157 157	N	18.759004	-3.084673	39.940047	156	158	159 158	H	19.447695	-2.558691	40.397716	157 159	C	18.294681	-2.650192	38.771901	157	160	167 160	O	17.400794	-3.202232	38.132255	159 161	ND2	15.355971	-0.323579	38.809144	162	163	164 162	HD22	14.696856	-0.214854	39.526191	161 163	HD21	14.998453	-0.639354	37.953067	161 164	CG	16.657667	-0.068689	38.906860	161	165	166 165	OD1	17.110157	0.389891	39.954658	164 166	CB	17.747092	-0.329476	37.879450	164	167 167	CA	18.825194	-1.285785	38.362770	159	166	168 168	N	19.622577	-1.488204	37.168732	167	169	170 169	H	19.073188	-1.454590	36.357896	168 170	C	20.951385	-1.443561	37.203546	168	171	179 171	O	21.572480	-1.150841	38.224075	170 172	NE2	26.167858	-2.190602	35.347953	173	174	175 173	HE22	27.056978	-2.568232	35.513074	172 174	HE21	25.975409	-1.274889	35.056682	172 175	CD	25.203943	-3.106891	35.362439	172	176	177 176	OE1	25.439587	-4.286905	35.617316	175 177	CG	23.812416	-2.640997	34.966173	175	178 178	CB	22.912159	-2.426953	36.172054	177	179 179	CA	21.583011	-1.759919	35.857661	170	178	180 180	N	21.816516	-0.455431	35.269172	179	181	182 181	H	22.641969	0.034109	35.467663	180 182	C	20.921509	0.209724	34.544268	180	183	188 183	O	19.720225	-0.054577	34.540350	182 184	CG1	19.754956	3.191075	33.750021	185	186 185	CD	19.241351	4.431189	34.504964	184 186	CB	21.082909	2.779299	34.364350	184	187	188 187	CG2	22.108538	3.856510	34.051101	186 188	CA	21.631615	1.413498	33.946650	182	186	189 189	N	21.766498	1.162711	32.524872	188	190	191 190	H	20.963869	1.065942	31.970928	189 191	C	22.982457	0.983176	32.016768	189	192	204 192	O	23.928380	0.487648	32.627199	191 193	CZ3	25.515466	-4.058847	29.074099	194	199 194	CH2	24.520924	-4.998703	28.895199	193	195 195	CZ2	23.207030	-4.805372	29.270351	194	200 196	NE1	21.629324	-3.092418	29.803135	197	198	200 197	HE1	20.714669	-3.437611	29.734674	196 198	CD1	21.726749	-1.791600	29.841013	196	202 199	CE3	25.138047	-2.825695	29.565339	193	201 200	CE2	22.856534	-3.603038	29.850047	195	196	201 201	CD2	23.834591	-2.637879	29.977968	199	200	202 202	CG	23.070009	-1.489783	29.936008	198	201	203 203	CB	23.603771	-0.075134	29.779911	202	204 204	CA	22.950714	1.092747	30.501027	191	203	205 205	N	23.739502	2.239659	30.094876	204	206	207 206	H	24.708965	2.155426	30.211010	205 207	C	23.185580	3.441111	29.958260	205	208	213 208	O	21.965644	3.560148	30.060940	207 209	OG1	24.883478	6.672343	30.691671	210	211 210	HG1	25.486567	7.135017	31.278033	209 211	CB	24.498761	5.350609	31.040137	212	209	213 212	CG2	25.709798	4.719805	31.707885	211 213	CA	24.071922	4.657367	29.744699	207	211	1 214	HT3	22.279527	5.833192	29.502246	1 215	HT2	23.082385	5.419113	28.112900	1

 spin on FahWiki  Start spinning  spin off  FahWiki  Stop spinning 

NicoV 19 June 2005