Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
{{{
Q. How to adjust weights for real space refine zone towards geometry
more than map.
A. Refine 3 well fitting residues, the chi squared values should be about 1.0.
If they are not, then adjust the weight until they are.
}}}
For β-strands:
{{{set cartoon_rect_length}}}
{{{set cartoon_rect_width}}}
For α-helices:
{{{set cartoon_oval_length}}}
{{{set cartoon_oval_width}}}
For loops:
{{{set cartoon_loop_radius}}}
For "fancy" α-helices:
{{{set cartoon_dumbell_length}}}
{{{set cartoon_dumbell_width}}}
{{{set cartoon_dumbell_radius}}} (radius of cylinder at edge of helix ribbon).
In each case "length" refers to what some might call the width and "width" refers to what some might call the thickness.
{{{
rmsBOND 0.011
rmsANGLE 1.2
}}}
@@READ THESE!!!!@@
Jaskolski et al.
Stereochemical restraints revisited: how accurate are refinement targets and how much should protein structures be allowed to deviate from them?
Acta Crystallogr D Biol Crystallogr (2007) vol. 63 (Pt 5) pp. 611-20
Stec et al.
Comment on Stereochemical restraints revisited: how accurate are refinement targets and how much should protein structures be allowed to deviate from them? by Jaskolski, Gilski, Dauter & Wlodawer (2007)
Acta Crystallogr D Biol Crystallogr (2007) vol. 63 (Pt 10) pp. 1113-4
Tickle et al.
Experimental determination of optimal root-mean-square deviations of macromolecular bond lengths and angles from their restrained ideal values
Acta Crystallogr D Biol Crystallogr (2007) vol. 63 (Pt 12) pp. 1274-81
Jaskolski et al.
Numerology versus reality: a voice in a recent dispute
Acta Crystallogr D Biol Crystallogr (2007) vol. 63 (Pt 12) pp. 1282-3
Manually assign secondary stuctures by using:
{{{alter 96-103/, ss='S'}}}
{{{alter 96-103/, ss='H'}}}
{{{alter 96-103/, ss='L'}}}
And then, to see the effect:
{{{rebuild}}}
to get the new draw
Example of script I use to create animations/movies. In this case, the script is a text file called pymol-scene.pml that
1. creates representation,
2. uses the scenes and movie commands of pymol to
3. generate a movie that is possible to run in pymol and then
4. save the movie as sequence of images that need to be built by ~QuickTime or ~ImageReady.
It runs by simply typing @pymol-scene.pml from the pymol command line. Here is the script:
{{{
load ./model.pdb
bg_color white
hide everything
show cartoon, chain B
set sticks_radius,0.15
show sticks, chain E
set cartoon_fancy_helices,1
set cartoon_dumbbell_width,0.2
set cartoon_rect_width,0.15
set cartoon_highlight_color,99
set cartoon_transparency, 0.4
color green, resi 43-285
color marine, resi 286-515
color cyan, resi 516-541
color yellow, resi 542-768
color red, resi 769-1016
@view.cmd
scene 001, store
color
orient chain E # this orient the view on the chain I want to focus on
clip near, 25.0
scene 002, store
hide cartoon
run color_by_attype.py
color_by_attype
run color_by_restype.py
color_by_restype
create v1, (resi 1 and name O17) # here I create dashed lines for inter-atomic distances
create v2, (resi 1 and name ZN)
create v3, (resi 1 and name O15)
create v4, (resi 108 and name ~NE2)
create v5, (resi 112 and name ~NE2)
create v6, (resi 189 and name ~OE1)
create v7, (resi 1 and name O15)
create v8, (resi 1 and name O15)
create v9, (resi 1 and name O15)
create v10, (resi 1 and name O15)
distance (v1), (v2) # and here I tell pymol to show those distances
distance (v3), (v2)
distance (v4), (v2)
distance (v5), (v2)
distance (v6), (v2)
distance (v3), (v2)
hide labels
set label_color,black
color black, dist**
set dash_gap,0.1
set sphere_scale,0.3
set stick_radius,0.15
show spheres, chain C
color magenta, chain C
set line_width,3
set valence,1
show lines, byres chain E expand 5
set label_position,[-1.5,1.1,0.5]
set label_size, 15
zoom chain E
clip near, 1.2
clip far, -5
turn x,45
turn y,45
scene 003, store
mset 1 x900
scene 001, animate=0
mview store, 1
mview store, 240
turn y,-30
mview store, 70
turn y,110
mview store, 170
scene 002, animate=0
mview store, 300
mview store, 540
turn y,-70
mview store, 370
turn y,60
mview store, 470
scene 003, animate=0
mview store, 600
mview store, 840
turn y,-60
mview store, 670
turn y,80
mview store, 770
mview interpolate
mview smooth
mview smooth
mdo 1: scene 001, view=0, quiet=1
mdo 240: scene 002, view=0, quiet=1
mdo 540: scene 003, view=0, quiet=1
mdo 840: scene 001, view=0, quiet=1
rewind
mplay
}}}
Anisotropic refinement
CGLS 20 -1 #20 cycles of conjugate-gradient least-squares refinement using all reflections. 10 cycles may not be quite enough to reach convergence, Convergence: normally consider a refinement job as converged when the change in wR2 is less than 0.001 in the between the last two cycles
PLAN 200 -1 0.0 #to include most ~Fo-Fc difference density peaks as pseudo atoms into the resulting pdb-file (they are a useful guide for finding interesting places in the subsequent graphix session) Replace it by PLAN 200 2.3 if we only want ot look for potential water molecules.
ANIS #statement to activate ADP's for all non-hydrogen atoms
DELU #generate rigid bond Uij restraints automatically using connectivity
SIMU #generate similar U (or Uij) restraints automatically using distances
ISOR 0.1 O_5001 > LAST #it's used only in case of anisotropic refinement of waters
CONN 0 O_5001 > LAST #avoid including waters in the connectivity list
FMAP code[2] axis[#] nl[53] #unique unit of the cell for performing the Fourier calculation
LIST m[#] mult[1] #output CIF files, when m=6 it writes out a free-format CIF file #(m=6 is the recomended one)
WPDB #output pdb file
BUMP #activate antibumping restraints
SWAT #activate bulk solvent correction
Common errors
** UNSET FREE VARIABLE FOR ATOM S **: check occupancy atom S, in one case it was set to 21, supposed to be 11 (for 1).
** REFINEMENT UNSTABLE **: not that much to do; try putting STIR keyword like here: STIR 1.1 0.05 [it means that the high resolution limit will be 1.1 to start with, decreasing in 0.05 A steps in every refinement cycle]
use .def file generated by at every refinement cycle
if needed, edit the .def file and then run:
{{{phenix.refine filename.def}}}
B & W Molscript & David Goodsell look-alike modes in ~PyMOL can be selected using:
{{{set ray_trace_mode = 0/1/2/3}}}
Check out the wiki for more info and some examples (specifically here: http://www.pymolwiki.org/index.php/Ray#Ray-Tracing_modes)
Is the chemical compound with the formula ~HOCH2CH2SH. It is a hybrid of ethylene glycol and ethanedithiol. ME, as it is commonly abbreviated, is used to reduce disulfide bonds and can act as a biological antioxidant as it scavages hydroxyl radicals (amongst others) . It is widely used because the hydroxyl group confers solubility in water and lowers the volatility, and hence odour, of the thiol.
[>img[alternate text|Images/mercaptoethanol.png]]
select two atoms you want to connect with
{{{
Ctrl+middle_mouse_button
}}}
while in mouse 3-Button Editing mode,
then type {{{bond}}} on the command line.
With {{{unbond}}} you can delete the bond.
[[pdf version|http://home.uchicago.edu/~emalito/CV_Enrico_Malito_Apr_2008.pdf]]
!''Education and Research History''
__April 2006 - present__
Postdoctoral fellow at the Ben May Department for Cancer Research, The University of Chicago, in the group of Prof. ~Wei-Jen Tang
- Crystallographic analysis and Molecular Dynamics studies of chemically-synthesized ~HIV1-protease
- Structural and functional characterization of Insulin Degrading Enzyme and control of amyloid β levels
__Feb 2005 - Mar 2006__
Postdoctoral fellow at the University of Illinois at Chicago (UIC), Dept. of Biochemistry and Molecular Genetics, in the group of Prof. Arnon Lavie
- Structural studies of Human Choline Kinase
__Jan 2005__
Ph.D. thesis defense and graduation from Università degli Studi di Pavia, Italy
Thesis title: "Phenylacetone monooxygenase and cytokinin dehydrogenase: structures and enzymatic mechanisms"
__Nov 2001- Jan 2005__
Ph.D. student in Genetics and Biomolecular Sciences at the Università degli Studi di Pavia,
Dept. of Genetics and Microbiology, Protein Crystallography Group of Prof. Andrea Mattevi
- Expression, purification and crystal structure determination of flavin-dependent monooxygenases
- Structural analysis of flavin-dependent dehydrogenases
__Sept 2001__
Degree in Biological Sciences, Università degli Studi di Pavia
Thesis title: "Studi Cristallografici sulla 4'-idrossiacetofenone monoossigenasi di Pseudomonas fluorescens"
__May 2000 - Sept 2001__
Research experience and thesis work in the laboratory of Structural Biology at the Dept. of Genetics and Microbiology, Università degli Studi di Pavia, coordinator prof. Andrea Mattevi
Structural analysis of 4-Hydroxyacetophenone monooxygenase from Pseudomonas fluorescens
__Nov 1998 - Sept 2001__
Bachelor student in Molecular Biology, Università degli Studi di Pavia
__Nov 1994 - Oct 1998__
Bachelor student in Biological Sciences, Università della Calabria, Cosenza, Italy
__Jul 1994__
High School Diploma at Liceo Scientifico Galileo Galilei, Paola (CS), Italy
!Awards
__July 2007__
American Heart Association (AHA) Postdoctoral Fellowship
__April 2007__
American Health Assistance Foundation (AHAF) Alzheimer's Disease Research Grant
(Funding period April 1, 2007-March 31, 2009)
!Publications
__2008__
Molecular bases for the recognition of short peptide substrates and cysteine-directed modifications of human insulin-degrading enzyme
''__Enrico Malito__'', Marika Manolopoulou, Luis A. Ralat, Julie L. Tsay, Natasha L. Wadlington, and ~Wei-Jen Tang.
Submitted
Designed inhibitors of insulin-degrading enzyme augment the secretion and activity of insulin
Malcolm A. Leissring, ''__Enrico Malito__'', Ji Zhao, Malwina Huzarska, Todd E. Logan, Sungwoon Choi, Benjamin E. Turk, Lewis C. Cantley, Wesley Farris, Marika Manolopoulou, ~Wei-Jen Tang, Ross L. Stein, Gregory D. Cuny, and Dennis J. Selkoe
Submitted
Amyloid β-degrading cryptidases: insulin degrading enzyme, presequence peptidase, and neprilysin
''__Enrico Malito__'', Raymond E. Hulse, and ~Wei-Jen Tang
Cell Mol Life Sci. 2008 May 13
PMID: 18470479
Revealing the moonlighting role of NADP in the structure of a flavin-containing monooxygenase
Andrea Alfieri, ''__Enrico Malito__'', Roberto Orru, Marco W. Fraaije, and Andrea Mattevi
Proc Natl Acad Sci U S A. 2008 May 6;105(18):6572-7
__2007__
Insights From ~Atomic-Resolution ~X-Ray Structures Of ~Chemically-Synthesized ~HIV-1 Protease In Complex With Inhibitors
Erik C.B. Johnson*, ''__Enrico Malito*__'', Yuequan Shen*, Brad Pentelute, Dan Rich, Jan Floriàn, ~Wei-Jen Tang, Stephen B.H. Kent
__equally contributed__
J. Mol. Biol. 2007 Oct 26;373(3):573-86
- Modular Total Chemical Synthesis of an ~HIV-1 Protease
Erik C.B. Johnson, ''__Enrico Malito__'', Yuequan Shen, Dan Rich, ~Wei-Jen Tang, Stephen B.H. Kent
J. Am. Chem. Soc. 2007 Sep 19;129(37):11480-90
- Structure of substrate-free human insulin-degrading enzyme (IDE) and biophysical analysis of ~ATP-induced conformational switch of IDE
Hookang Im*, Marika Manolopoulou*, ''__Enrico Malito*__'', Yuequan Shen, Ji Zhao, Marie ~Neant-Fery,~Ching-Yu Sun, Stephen C. Meredith, Sangram S. Sisodia, Malcolm Leissring, ~Wei-Jen Tang
__equally contributed__
J. Biol. Chem. 2007 Aug 31;282(35):25453-63
__2006__
- Elucidation of Human Choline Kinase Crystal Structures in Complex with the Products ADP or Phosphocholine
''__Enrico Malito__'', Nikolina Sekulic, Wei Cun See Too, Manfred Konrad and Arnon Lavie
J. Mol. Biol. 2006 Nov 24;364(2):136-151
__2005__
- ~Baeyer-Villiger Monooxygenases: from Genome Analysis to Structural Details
Marco W. Fraaije, D.E. Torres Pazmino, ''__Enrico Malito__'', Andrea Mattevi, D.B. Janssen
J. Biotechnol. 2005 Aug 1;118(S1):~S88-S88
__2004__
- Crystal Structure of a ~Baeyer-Villiger Monooxygenase
''__Enrico Malito__'', Andrea Alfieri, Marco W. Fraaije and Andrea Mattevi
Proc. Natl. Acad. Sci. U S A. 2004 Sep 7;101(36):13157-62
- Structures of Michaelis and Product Complexes of Plant Cytokinin Dehydrogenase: Implications for Flavoenzyme Catalysis
''__Enrico Malito__'', Alessandro Coda, Kristin D. Bilyeu, Marco W. Fraaije and Andrea Mattevi
J. Mol. Biol. 2004 Aug 27;341(5):1237-49
program to calculate hydrodynamic radius of a protein from atomic coordinates:
[[The HYDRO Suite|http://leonardo.fcu.um.es/macromol/programs/programs.htm]] ([[reference|http://www.biophysj.org/cgi/content/abstract/67/2/530]])
1. [[PISA|http://www.ebi.ac.uk/msd-srv/prot_int/pistart.html]]
2. [[http://www.ebi.ac.uk/thornton-srv/databases/pita/|http://www.ebi.ac.uk/thornton-srv/databases/pita/]]
3. [[Surface|http://www.ccp4.ac.uk/dist/html/surface.html]]
4. [[areaimol in CCP4|http://www.ccp4.ac.uk/dist/html/areaimol.html]]
5. [[NACCESS|http://wolf.bms.umist.ac.uk/naccess/]]
6. [[CCP4mg|http://www.ysbl.york.ac.uk/~ccp4mg/ccp4mg_help/analysis.html#sas]]
7. see the discussion and references [[here|http://xray.bmc.uu.se/cgi-bin/gerard/reprint_mailer.pl?pref=84]]
8. [[Chimera|http://www.cgl.ucsf.edu/pipermail/chimera-users/2006-December/001131.html]]
In order to collect a complete data set, the crystal should be positioned, such
that the cusp (the angular region of reciprocal space that does not cross the Ewald
sphere during rotation of the crystal) does not lie too close to a crystallographic
axis.
After taking a single frame of data, the program strategy can be run to predict the
optimum oscillation (phi) range and starting point.
If strategy suggests that complete data cannot be obtained, even with a 360-degree
rotation of the crystal, then look at the values for rotz and roty. It is likely
that they are too close to 0 (zero), or too close to 90 degrees if the axis defined
in the spindle command in the denzo integration input file is not really aligned
along the spindle. In the latter case it might be useful to use xdisp to determine
which axis is closest to the spindle axis (pick spot predictions in the zoom window
to see the reflection indices).
The following calculation is an attempt to define what the minimum offset of the
crystal should be from the fully aligned position. If the value for delta-chi is
less than the ideal calculated chi value, which is determined only by the maximum
resolution, then it would be advisable to try to adjust the arcs of the goniometer
head in order to tilt the crystal away from its alignment.
Chi is calculated using the formula:
chi = sin-1(lambda/(2*res))
and
~Delta-Chi is calculated using the formula:
dchi = cos-1(cos(roty)*cos(rotz)),
where
rotz = the rotation around the beam axis, and
roty = the rotation around the vertical axis, using the denzo notation.
In the case of the ~R-Axes (sic), the vertical axis is actually horizontal.
MATTHEWS COEFFICIENT: ratio of unit cell volume and molecular weight is between 1.7 and 3.5 A^3/Da with most values around 2.15 A^3/Da.
This number is called VM.
Vm (specific volume) is calculated using the formula:
{{{
Vm = V/(n*m)
}}}
where,
{{{
Vm = volume of the unit cell,
n = the number of asymmetric units,
M = molecular weight of contents of the asymmetric unit
}}}
One expects a Vm of between 1.68Å^3/dalton and 3.53Å^3/dalton.
Solvent content is also calculated by:
{{{
solvent content = (1 - 1.23/Vm)
}}}
/***
|Name|CalendarPlugin|
|Source|http://www.TiddlyTools.com/#CalendarPlugin|
|Version|2008.02.27|
|Author|Eric Shulman|
|Original Author|SteveRumsby|
|License|unknown|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|display monthly and yearly calendars|
NOTE: For enhanced date display (including popups), you must also install [[DatePlugin]]
!!!!!Usage:
<<<
|{{{<<calendar>>}}}|Produce a full-year calendar for the current year|
|{{{<<calendar year>>}}}|Produce a full-year calendar for the given year|
|{{{<<calendar year month>>}}}|Produce a one-month calendar for the given month and year|
|{{{<<calendar thismonth>>}}}|Produce a one-month calendar for the current month|
|{{{<<calendar lastmonth>>}}}|Produce a one-month calendar for last month|
|{{{<<calendar nextmonth>>}}}|Produce a one-month calendar for next month|
<<<
!!!!!Configuration:
<<<
|''First day of week:''<br>{{{config.options.txtCalFirstDay}}}|<<option txtCalFirstDay>>|(Monday = 0, Sunday = 6)|
|''First day of weekend:''<br>{{{config.options.txtCalStartOfWeekend}}}|<<option txtCalStartOfWeekend>>|(Monday = 0, Sunday = 6)|
<<option chkDisplayWeekNumbers>> Display week numbers //(note: Monday will be used as the start of the week)//
|''Week number display format:''<br>{{{config.options.txtWeekNumberDisplayFormat }}}|<<option txtWeekNumberDisplayFormat >>|
|''Week number link format:''<br>{{{config.options.txtWeekNumberLinkFormat }}}|<<option txtWeekNumberLinkFormat >>|
<<<
!!!!!Revisions
<<<
2008.02.27: in handler(), DON'T set hard-coded default date format, so that *customized* value (pre-defined in config.macros.calendar.journalDateFmt is used.
2008.02.17: in createCalendarYear(), fix next/previous year calculation (use parseInt() to convert to numeric value). Also, use journalDateFmt for date linking when NOT using [[DatePlugin]].
2008.02.16: in createCalendarDay(), week numbers now created as TiddlyLinks, allowing quick creation/navigation to 'weekly' journals (based on request from Kashgarinn)
2008.01.08: in createCalendarMonthHeader(), "month year" heading is now created as TiddlyLink, allowing quick creation/navigation to 'month-at-a-time' journals
2007.11.30: added "return false" to onclick handlers (prevent IE from opening blank pages)
2006.08.23: added handling for weeknumbers (code supplied by Martin Budden (see "wn**" comment marks). Also, incorporated updated by Jeremy Sheeley to add caching for reminders (see [[ReminderMacros]], if installed)
2005.10.30: in config.macros.calendar.handler(), use "tbody" element for IE compatibility. Also, fix year calculation for IE's getYear() function (which returns '2005' instead of '105'). Also, in createCalendarDays(), use showDate() function (see [[DatePlugin]], if installed) to render autostyled date with linked popup. Updated calendar stylesheet definition: use .calendar class-specific selectors, add text centering and margin settings
2006.05.29: added journalDateFmt handling
<<<
***/
/***
!!!!!Code section:
***/
//{{{
version.extensions.calendar = { major: 0, minor: 6, revision: 0, date: new Date(2008, 2, 27)};
if(config.options.txtCalFirstDay == undefined)
config.options.txtCalFirstDay = 0;
if(config.options.txtCalStartOfWeekend == undefined)
config.options.txtCalStartOfWeekend = 5;
if(config.options.chkDisplayWeekNumbers == undefined)//wn**
config.options.chkDisplayWeekNumbers = false;
if(config.options.chkDisplayWeekNumbers)
config.options.txtCalFirstDay = 0;
if(config.options.txtWeekNumberDisplayFormat == undefined)//wn**
config.options.txtWeekNumberDisplayFormat = "w0WW";
if(config.options.txtWeekNumberLinkFormat == undefined)//wn**
config.options.txtWeekNumberLinkFormat = "YYYY-w0WW";
config.macros.calendar = {};
config.macros.calendar.monthnames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
config.macros.calendar.daynames = ["M", "T", "W", "T", "F", "S", "S"];
config.macros.calendar.weekendbg = "#c0c0c0";
config.macros.calendar.monthbg = "#e0e0e0";
config.macros.calendar.holidaybg = "#ffc0c0";
config.macros.calendar.journalDateFmt = "DD MMM YYYY";
config.macros.calendar.monthdays = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
config.macros.calendar.holidays = [ ]; // Not sure this is required anymore - use reminders instead
//}}}
//{{{
function calendarIsHoliday(date) // Is the given date a holiday?
{
var longHoliday = date.formatString("0DD/0MM/YYYY");
var shortHoliday = date.formatString("0DD/0MM");
for(var i = 0; i < config.macros.calendar.holidays.length; i++) {
if(config.macros.calendar.holidays[i] == longHoliday || config.macros.calendar.holidays[i] == shortHoliday)
return true;
}
return false;
}
//}}}
//{{{
config.macros.calendar.handler = function(place,macroName,params) {
var calendar = createTiddlyElement(place, "table", null, "calendar", null);
var tbody = createTiddlyElement(calendar, "tbody", null, null, null);
var today = new Date();
var year = today.getYear();
if (year<1900) year+=1900;
// get format for journal link by reading from SideBarOptions (ELS 5/29/06 - based on suggestion by Martin Budden)
var text = store.getTiddlerText("SideBarOptions");
var re = new RegExp("<<(?:newJournal)([^>]*)>>","mg"); var fm = re.exec(text);
if (fm && fm[1]!=null) { var pa=fm[1].readMacroParams(); if (pa[0]) this.journalDateFmt = pa[0]; }
if (params[0] == "thismonth") {
cacheReminders(new Date(year, today.getMonth(), 1, 0, 0), 31);
createCalendarOneMonth(tbody, year, today.getMonth());
}
else if (params[0] == "lastmonth") {
var month = today.getMonth()-1; if (month==-1) { month=11; year--; }
cacheReminders(new Date(year, month, 1, 0, 0), 31);
createCalendarOneMonth(tbody, year, month);
}
else if (params[0] == "nextmonth") {
var month = today.getMonth()+1; if (month>11) { month=0; year++; }
cacheReminders(new Date(year, month, 1, 0, 0), 31);
createCalendarOneMonth(tbody, year, month);
} else {
if (params[0]) year = params[0];
if(params[1]) {
cacheReminders(new Date(year, params[1]-1, 1, 0, 0), 31);
createCalendarOneMonth(tbody, year, params[1]-1);
} else {
cacheReminders(new Date(year, 0, 1, 0, 0), 366);
createCalendarYear(tbody, year);
}
}
window.reminderCacheForCalendar = null;
}
//}}}
//{{{
//This global variable is used to store reminders that have been cached
//while the calendar is being rendered. It will be renulled after the calendar is fully rendered.
window.reminderCacheForCalendar = null;
//}}}
//{{{
function cacheReminders(date, leadtime)
{
if (window.findTiddlersWithReminders == null) return;
window.reminderCacheForCalendar = {};
var leadtimeHash = [];
leadtimeHash [0] = 0;
leadtimeHash [1] = leadtime;
var t = findTiddlersWithReminders(date, leadtimeHash, null, 1);
for(var i = 0; i < t.length; i++) {
//just tag it in the cache, so that when we're drawing days, we can bold this one.
window.reminderCacheForCalendar[t[i]["matchedDate"]] = "reminder:" + t[i]["params"]["title"];
}
}
//}}}
//{{{
function createCalendarOneMonth(calendar, year, mon)
{
var row = createTiddlyElement(calendar, "tr", null, null, null);
createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, true, year, mon);
row = createTiddlyElement(calendar, "tr", null, null, null);
createCalendarDayHeader(row, 1);
createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarMonth(calendar, year, mon)
{
var row = createTiddlyElement(calendar, "tr", null, null, null);
createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, false, year, mon);
row = createTiddlyElement(calendar, "tr", null, null, null);
createCalendarDayHeader(row, 1);
createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarYear(calendar, year)
{
var row;
row = createTiddlyElement(calendar, "tr", null, null, null);
var back = createTiddlyElement(row, "td", null, null, null);
var backHandler = function() {
removeChildren(calendar);
createCalendarYear(calendar, parseInt(year)-1);
return false; // consume click
};
createTiddlyButton(back, "<", "Previous year", backHandler);
back.align = "center";
var yearHeader = createTiddlyElement(row, "td", null, "calendarYear", year);
yearHeader.align = "center";
yearHeader.setAttribute("colSpan",config.options.chkDisplayWeekNumbers?22:19);//wn**
var fwd = createTiddlyElement(row, "td", null, null, null);
var fwdHandler = function() {
removeChildren(calendar);
createCalendarYear(calendar, parseInt(year)+1);
return false; // consume click
};
createTiddlyButton(fwd, ">", "Next year", fwdHandler);
fwd.align = "center";
createCalendarMonthRow(calendar, year, 0);
createCalendarMonthRow(calendar, year, 3);
createCalendarMonthRow(calendar, year, 6);
createCalendarMonthRow(calendar, year, 9);
}
//}}}
//{{{
function createCalendarMonthRow(cal, year, mon)
{
var row = createTiddlyElement(cal, "tr", null, null, null);
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon], false, year, mon);
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+1], false, year, mon);
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+2], false, year, mon);
row = createTiddlyElement(cal, "tr", null, null, null);
createCalendarDayHeader(row, 3);
createCalendarDayRows(cal, year, mon);
}
//}}}
//{{{
function createCalendarMonthHeader(cal, row, name, nav, year, mon)
{
var month;
if (nav) {
var back = createTiddlyElement(row, "td", null, null, null);
back.align = "center";
back.style.background = config.macros.calendar.monthbg;
var backMonHandler = function() {
var newyear = year;
var newmon = mon-1;
if(newmon == -1) { newmon = 11; newyear = newyear-1;}
removeChildren(cal);
cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
createCalendarOneMonth(cal, newyear, newmon);
return false; // consume click
};
createTiddlyButton(back, "<", "Previous month", backMonHandler);
month = createTiddlyElement(row, "td", null, "calendarMonthname")
createTiddlyLink(month,name,true);
month.setAttribute("colSpan", config.options.chkDisplayWeekNumbers?6:5);//wn**
var fwd = createTiddlyElement(row, "td", null, null, null);
fwd.align = "center";
fwd.style.background = config.macros.calendar.monthbg;
var fwdMonHandler = function() {
var newyear = year;
var newmon = mon+1;
if(newmon == 12) { newmon = 0; newyear = newyear+1;}
removeChildren(cal);
cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
createCalendarOneMonth(cal, newyear, newmon);
return false; // consume click
};
createTiddlyButton(fwd, ">", "Next month", fwdMonHandler);
} else {
month = createTiddlyElement(row, "td", null, "calendarMonthname", name)
month.setAttribute("colSpan",config.options.chkDisplayWeekNumbers?8:7);//wn**
}
month.align = "center";
month.style.background = config.macros.calendar.monthbg;
}
//}}}
//{{{
function createCalendarDayHeader(row, num)
{
var cell;
for(var i = 0; i < num; i++) {
if (config.options.chkDisplayWeekNumbers) createTiddlyElement(row, "td");//wn**
for(var j = 0; j < 7; j++) {
var d = j + (config.options.txtCalFirstDay - 0);
if(d > 6) d = d - 7;
cell = createTiddlyElement(row, "td", null, null, config.macros.calendar.daynames[d]);
if(d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))
cell.style.background = config.macros.calendar.weekendbg;
}
}
}
//}}}
//{{{
function createCalendarDays(row, col, first, max, year, mon) {
var i;
if (config.options.chkDisplayWeekNumbers){
if (first<=max) {
var ww = new Date(year,mon,first);
var td=createTiddlyElement(row, "td");//wn**
var link=createTiddlyLink(td,ww.formatString(config.options.txtWeekNumberLinkFormat),false);
link.appendChild(document.createTextNode(ww.formatString(config.options.txtWeekNumberDisplayFormat)));
}
else createTiddlyElement(row, "td", null, null, null);//wn**
}
for(i = 0; i < col; i++)
createTiddlyElement(row, "td", null, null, null);
var day = first;
for(i = col; i < 7; i++) {
var d = i + (config.options.txtCalFirstDay - 0);
if(d > 6) d = d - 7;
var daycell = createTiddlyElement(row, "td", null, null, null);
var isaWeekend = ((d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))? true:false);
if(day > 0 && day <= max) {
var celldate = new Date(year, mon, day);
// ELS 2005.10.30: use <<date>> macro's showDate() function to create popup
// ELS 5/29/06 - use journalDateFmt
if (window.showDate)
showDate(daycell,celldate,"popup","DD",config.macros.calendar.journalDateFmt,true, isaWeekend);
else {
if(isaWeekend) daycell.style.background = config.macros.calendar.weekendbg;
var title = celldate.formatString(config.macros.calendar.journalDateFmt);
if(calendarIsHoliday(celldate))
daycell.style.background = config.macros.calendar.holidaybg;
if(window.findTiddlersWithReminders == null) {
var link = createTiddlyLink(daycell, title, false);
link.appendChild(document.createTextNode(day));
} else
var button = createTiddlyButton(daycell, day, title, onClickCalendarDate);
}
}
day++;
}
}
//}}}
//{{{
// We've clicked on a day in a calendar - create a suitable pop-up of options.
// The pop-up should contain:
// * a link to create a new entry for that date
// * a link to create a new reminder for that date
// * an <hr>
// * the list of reminders for that date
// NOTE: The following code is only used when [[DatePlugin]] is not present
function onClickCalendarDate(e)
{
var button = this;
var date = button.getAttribute("title");
var dat = new Date(date.substr(6,4), date.substr(3,2)-1, date.substr(0, 2));
date = dat.formatString(config.macros.calendar.journalDateFmt);
var popup = createTiddlerPopup(this);
popup.appendChild(document.createTextNode(date));
var newReminder = function() {
var t = store.getTiddlers(date);
displayTiddler(null, date, 2, null, null, false, false);
if(t) {
document.getElementById("editorBody" + date).value += "\n<<reminder day:" + dat.getDate() +
" month:" + (dat.getMonth()+1) + " year:" + (dat.getYear()+1900) + " title: >>";
} else {
document.getElementById("editorBody" + date).value = "<<reminder day:" + dat.getDate() +
" month:" + (dat.getMonth()+1) +" year:" + (dat.getYear()+1900) + " title: >>";
}
return false; // consume click
};
var link = createTiddlyButton(popup, "New reminder", null, newReminder);
popup.appendChild(document.createElement("hr"));
var t = findTiddlersWithReminders(dat, [0,14], null, 1);
for(var i = 0; i < t.length; i++) {
link = createTiddlyLink(popup, t[i].tiddler, false);
link.appendChild(document.createTextNode(t[i].tiddler));
}
return false; // consume click
}
//}}}
//{{{
function calendarMaxDays(year, mon)
{
var max = config.macros.calendar.monthdays[mon];
if(mon == 1 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) max++;
return max;
}
//}}}
//{{{
function createCalendarDayRows(cal, year, mon)
{
var row = createTiddlyElement(cal, "tr", null, null, null);
var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first1 < 0) first1 = first1 + 7;
var day1 = -first1 + 1;
var first2 = (new Date(year, mon+1, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first2 < 0) first2 = first2 + 7;
var day2 = -first2 + 1;
var first3 = (new Date(year, mon+2, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first3 < 0) first3 = first3 + 7;
var day3 = -first3 + 1;
var max1 = calendarMaxDays(year, mon);
var max2 = calendarMaxDays(year, mon+1);
var max3 = calendarMaxDays(year, mon+2);
while(day1 <= max1 || day2 <= max2 || day3 <= max3) {
row = createTiddlyElement(cal, "tr", null, null, null);
createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
createCalendarDays(row, 0, day2, max2, year, mon+1); day2 += 7;
createCalendarDays(row, 0, day3, max3, year, mon+2); day3 += 7;
}
}
//}}}
//{{{
function createCalendarDayRowsSingle(cal, year, mon)
{
var row = createTiddlyElement(cal, "tr", null, null, null);
var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first1 < 0) first1 = first1+ 7;
var day1 = -first1 + 1;
var max1 = calendarMaxDays(year, mon);
while(day1 <= max1) {
row = createTiddlyElement(cal, "tr", null, null, null);
createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
}
}
//}}}
//{{{
setStylesheet(".calendar, .calendar table, .calendar th, .calendar tr, .calendar td { text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }", "calendarStyles");
//}}}
The total target for refinement of coordinates in phenix.refine is defined as:
/*{{{*/
Etotal = wc_scale * wxc * Exray + wc * Egeom
/*}}}*/
- Egeom is geometry restrains target (Ebonds + Eangles + Eplanarities + Enonboned +...);
- wc = 1.0 and is used to exclude geometry restraints by setting wc = 0.0;
- wxc ~ ratio of gradient's norms for geometry and x-ray targets as defined in (Adams et al, 1997, PNAS, Vol. 94, p. 5018);
- wc_scale is 'ad hoc' scale found empirically to be ok for most of the cases at medium resolution. It should be optimized at higher and lower resolutions. The default values are most likely NOT optimal at resolutions higher then 1.5A. Currently we are working on making it resolution dependent rather than one single value for all resolutions.
It is advised to play with wc_scale manually if:
- Rfree or Rfree - Rwork look not realistic;
- geometry deviations look not good (too tight or too loose at given resolution).
However, once again, the default values for most of cases at "normal" resolution are OK.
{{{target_weights.fix_wxc=10}}} for coordinate refinement
{{{target_weights.fix_wxu=10}}} for ADP refinement
@@method 1@@
In zsh
{{{
autoload -U zmv
alias mmv='noglob zmv -W'
}}}
Then:
{{{
mmv 1105\ A*.osc A*.osc
}}}
Also a good idea is to put {{{alias mmv='noglob zmv -W'}}} in .zshrc file
@@method 2@@
Using a perl script: chmod a+x it and then put it in your path (~/bin)
You run it like this:
{{{
rename-alot 's/1105 A/A/' *.osc
}}}
The above will change all files that look like this: "1105 A0176.osc" to this "A0176.osc"
The script:
{{{
#!/usr/bin/perl -w
# rename - Larry's filename fixer
$op = shift or die "Usage: rename-alot expr [files]\n" .
"eg: % rename-alot \'s/abc /abc-/\' abc*txt\n" ;
chomp(@ARGV = <STDIN>) unless @ARGV;
for (@ARGV) {
$was = $_;
eval $op;
die $@ if $@;
rename($was,$_) unless $was eq $_;
}
}}}
@@method 3@@
The linux command 'rename'
{{{
rename 1055 '' 1055*.osc
}}}
@@method 4@@
To remane 336 images files from 760D6a0001(to 336).img to 760D6a0_001(to _336).img
Just save the script below (like filename.com) and run as sh filename.com
{{{
for i in 760D6a0***.img
do
mv $i ${i%760D6a0***}760D6a0_${i#760D6a0}
done
}}}
*[[BME (2-mercaptoethanol)]]
*[[Chloramphenicol]]
*[[DTT (dithiothreitol)]]
*[[EDTA (ethylenediamine tetraacetic acid)]]
*[[Guanidine-HCl/Guanidinium hydrochloride]]
*[[PMSF (phenylmethylsulfonyl fluoride)]]
*[[SDS (sodium dodecyl sulfate)]]
*[[DMSO]]
!1.Labels (2dlabels)
to create label lab1 containing text junk:
{{{
2dlabels create lab1 text 'junk' color light sea green
size 26 xpos .03 ypos .92 visibility show
}}}
to modify i.e. the x and y pos of lab1:
{{{2dlabels change lab1 xpos .13 ypos .22 visibility show}}}
to delete label called lab1:
{{{2dlabels delete lab1}}}
!2.Movies:
!!!Example of script to create animation that can be saved as movie
load pdb model, orient it and save chimera file .py
prepare representation of the model by using keywords as shown here;
{{{
surftransparency 50 #0;
surftransparency 50 #1;
surface #0;
surface #1;
vdwdefine 1.5 @ZN=
display @ZN=
color magenta @ZN=
ribbon #4:515-548;
color orange #4
color green #1:330-339,359-363
}}}
now save the following as movie.com file:
{{{
surftransparency 50 #0;
surftransparency 50 #1;
surface #0;
surface #1;
vdwdefine 1.5 @ZN=
display @ZN=
color magenta @ZN=
ribbon #4:515-548;
color orange #4
color green #1:330-339,359-363
wait 100;
2dlabels create lab1 text 'the catalytic crypt of IDE' color red size 32 xpos .10 ypos .86 visibility show
2dlabels create lab2 text '~IDE-N' color blue size 26 xpos .16 ypos .22 visibility show
2dlabels create lab3 text '~IDE-C' size 26 xpos .64 ypos .22 visibility show
2dlabels create lab4 text 'hinge joining ~IDE-N and ~IDE-C' color orange size 22 xpos .65 ypos .86 visibility show
2dlabels create lab5 text 'catalytic Zinc' color magenta size 22 xpos .65 ypos .83 visibility show
2dlabels create lab6 text 'conserved exosite' color green size 22 xpos .65 ypos .80 visibility show
rock;
wait 200;
freeze;
2dlabels change lab2 visibility hide;
2dlabels change lab3 visibility hide;
roll y 2 130; wait
~surface #0;
surface #1,
2dlabels change lab2 visibility show;
rock;
wait 200;
freeze;
2dlabels change lab2 visibility hide;
surface #0;
roll y 2 90; wait
~surface #1;
2dlabels change lab3 visibility show;
rock;
wait 200;
freeze;
2dlabels change lab3 visibility hide;
surface #1;
surface #0;
roll y 2 148; wait
2dlabels change lab2 visibility show;
2dlabels change lab3 visibility show;
}}}
once the .py file is open, use the command line (Favorites>Command Line) and start the script movie.com as {{{open movie.com}}}
ATT. keep the window Tools>Utilities>Movie Recorder open and push {{{Record}}} immediately after starting the script;
the {{{wait}}} keywords are there to give a reasonable time interval and allow therefore to record the entire movie.
!3.Selections
to select residues 45-83 and 90-98 in model 3:
{{{#3:45-83,90-98}}}
[<img[alternate text|Images/chloramphenicol.png]]
Inhibits translation by blocking peptidyl transferase on the 70S ribosomal subunit; It inhibits protein synthesis and blocks host DNA synthesis but has no effect on replication of relaxed plasmids.
For preparing 10 mg/ml stock solution:
Measure 100 mg of Chloramphenicol (~MW323.1) into a Falcon tube; add 100% ~EtOH to 10 ml. Store at -20.
Storage: dessicator at room temperature
Ordering info: Sigma C-0378
Two clipping planes (near and far; see Fig3 in this page: http://www.liv.ac.uk/~afcalder/apt1.html). The positions of these planes can be moved to selectively reveal objects between these two planes ("slab"). The near and far planes can be manipulated by mouse and these are the basic command line clipping plane functions:
moves near plane away from viewer by 5 units
{{{clip near,-5}}}
moves far plane towards viewer by 10 units
{{{clip far, 10}}}
sets the clipping planes to make a 'slab' 1.0 units thick
{{{clip slab, 1.0}}}
moves the clipping slab towards viewer by 0.5 units
{{{clip move, 0.5}}}
creates a slab 1.0 units thick centred on object called 'name'
{{{clip slab, 1.0,name}}}
creates a slab 1.1 units thick centred on object called '001_12v'
{{{clip slab, 1.1,001_12v}}}
/***
|Name:|CloseOnCancelPlugin|
|Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.commands.cancelTiddler,{
handler_mptw_orig_closeUnsaved: config.commands.cancelTiddler.handler,
handler: function(event,src,title) {
this.handler_mptw_orig_closeUnsaved(event,src,title);
if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))
story.closeTiddler(title,true);
return false;
}
});
//}}}
(and other useful scripts... see [[here|http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/]]
{{{color_b(selection='sel',ramp=0 or 1, rainbow=0 or 1, nbins=10)}}}
This function allows coloring of a selection as a function of B-value, either in a range of hues from blue through magenta to red (rainbow=0, the default) or in the colors of the rainbow (rainbow=1). The division of B-value ranges can either be as a histogram (equal-sized B-value increments leading to unequal numbers of atoms in each bin: ramp=0) or as a ramp of B-value ranges with an equal number of atoms in each group (ramp=1). Usage: from within ~PyMOL run
{{{color_b.py}}}
to load the function definition.
Then you can use for example:
{{{color_b('(c;a or c;b)',ramp=1,rainbow=1,nbins=30)}}}
to color chains A and B with the rainbow colors in 30 colors of equal numbers of atoms in each color.
More examples:
{{{color_b('all',ramp=1,rainbow=0,nbins=10)}}}
{{{color_b('resi 1:30',ramp=0,rainbow=0,nbins=30)}}}
Name: MptwTeal
Background: #fff
Foreground: #000
PrimaryPale: #B5D1DF
PrimaryLight: #618FA9
PrimaryMid: #1a3844
PrimaryDark: #000
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #f8f8f8
TertiaryLight: #bbb
TertiaryMid: #999
TertiaryDark: #888
Error: #f88
//email address:// [[emalito@uchicago.edu|mailto:emalito@uchicago.edu]]
//Lab Address://
[[Ben-May Department for Cancer Research|http://ben-may.bsd.uchicago.edu/bmi2/index.html]]
Gordon Center for Integrative Science, room ~W423J
The University of Chicago
929 E. 57th Street
Chicago, IL, 60637
Tel: +1-773-702-4608
Fax: +1-773-702-6260
To "jump" from refmac to shelxl for high res refinement
Trying to convert the original mtz of the structure to the shelx .hkl format.
How do I keep the original Rfree flag? The shelx .hkl file has a column of 1/-1 for that, while the mtz from ccp4 has the flag 0 (for the ~FreeRflag).
mtz2various recognizes the ~FreeRflag in the mtz and put a column of 0 in the output .hkl for shelx. Is that correct? Is theset of ~FreeRflag going to be consistent?
Better doing these things the other way around, i.e. do all the data preparation in ~SHELX-format and then convert to mtz. For that direction f2mtz seems to work. If it's too late and your data are already in mtz or cns format, simply check the first 100 or so reflections in the mtz-file using mtzdump and compare them to the ~SHELXL-hkl file. The order should be the same and you can check whether work and free set are correctly marked. If the free set is marked by 0 and not by -1, I would simply edit the hkl-file. In vi you can use a command like:
':s/ 0$/-1/g'
to achieve the required effect. After that I would run a job and check whether the numbers of reflections make sense.
Use f2mtz, keep or generate new Rfree flag and in the line
(6X,3F5.0,6X,F10.3,7X,F10.3,6X,F10.0)
add 10X in fornt of 7x
(6X,3F5.0,6X,F10.3,10X,7X,F10.3,6X,F10.0)
for imaginary component of F (????)
Scalepack produces a .sca file containing h, k, l, I, sigI in this format
{{{
1
-987
171.840 171.840 144.569 90.000 90.000 120.000 p6522
2 0 7 1567.4 89.6
3 -1 7 10777.9 406.8
}}}
X-plor requires h, k, l, F, sigF like this:
{{{
INDE 6 0 0 FOBS= 57.366 SIGMA= 2.182
INDE 7 0 0 FOBS= 5.814 SIGMA= 0.471
INDE 8 0 0 FOBS= 25.496 SIGMA= 0.979
INDE 9 0 0 FOBS= 15.720 SIGMA= 0.439
INDE 10 0 0 FOBS= 17.299 SIGMA= 0.484
}}}
[[Manual|http://www.ysbl.york.ac.uk/~emsley/coot/doc/chapters/user-manual_toc.html#SEC_Contents]]
[[Wiki|http://strucbio.biologie.uni-konstanz.de/ccp4wiki/index.php/COOT]]
[[Adjust weights for real space refine]]
[[Difference Map Colouring]]
[[Input keys]]
[[Low-resolution data]]
[[Mask maps]]
[[Options via scripting]]
[[Rotate maps]]
[[Real-space refinement and low resolution electron density maps]]
use the command:
{{{elbow.builder ligand.pdb}}}
where name.pdb is the pdb file of the ligand, and it creates cif file ready for refinement.
Then to use the new .cif file in phenix.refine just specify the name after the data and model names:
{{{phenix.refine yyy.mtz xxx.pdb zzz.cif}}}
/***
|''Name:''|CryptoFunctionsPlugin|
|''Description:''|Support for cryptographic functions|
***/
//{{{
if(!version.extensions.CryptoFunctionsPlugin) {
version.extensions.CryptoFunctionsPlugin = {installed:true};
//--
//-- Crypto functions and associated conversion routines
//--
// Crypto "namespace"
function Crypto() {}
// Convert a string to an array of big-endian 32-bit words
Crypto.strToBe32s = function(str)
{
var be = Array();
var len = Math.floor(str.length/4);
var i, j;
for(i=0, j=0; i<len; i++, j+=4) {
be[i] = ((str.charCodeAt(j)&0xff) << 24)|((str.charCodeAt(j+1)&0xff) << 16)|((str.charCodeAt(j+2)&0xff) << 8)|(str.charCodeAt(j+3)&0xff);
}
while (j<str.length) {
be[j>>2] |= (str.charCodeAt(j)&0xff)<<(24-(j*8)%32);
j++;
}
return be;
};
// Convert an array of big-endian 32-bit words to a string
Crypto.be32sToStr = function(be)
{
var str = "";
for(var i=0;i<be.length*32;i+=8)
str += String.fromCharCode((be[i>>5]>>>(24-i%32)) & 0xff);
return str;
};
// Convert an array of big-endian 32-bit words to a hex string
Crypto.be32sToHex = function(be)
{
var hex = "0123456789ABCDEF";
var str = "";
for(var i=0;i<be.length*4;i++)
str += hex.charAt((be[i>>2]>>((3-i%4)*8+4))&0xF) + hex.charAt((be[i>>2]>>((3-i%4)*8))&0xF);
return str;
};
// Return, in hex, the SHA-1 hash of a string
Crypto.hexSha1Str = function(str)
{
return Crypto.be32sToHex(Crypto.sha1Str(str));
};
// Return the SHA-1 hash of a string
Crypto.sha1Str = function(str)
{
return Crypto.sha1(Crypto.strToBe32s(str),str.length);
};
// Calculate the SHA-1 hash of an array of blen bytes of big-endian 32-bit words
Crypto.sha1 = function(x,blen)
{
// Add 32-bit integers, wrapping at 32 bits
add32 = function(a,b)
{
var lsw = (a&0xFFFF)+(b&0xFFFF);
var msw = (a>>16)+(b>>16)+(lsw>>16);
return (msw<<16)|(lsw&0xFFFF);
};
// Add five 32-bit integers, wrapping at 32 bits
add32x5 = function(a,b,c,d,e)
{
var lsw = (a&0xFFFF)+(b&0xFFFF)+(c&0xFFFF)+(d&0xFFFF)+(e&0xFFFF);
var msw = (a>>16)+(b>>16)+(c>>16)+(d>>16)+(e>>16)+(lsw>>16);
return (msw<<16)|(lsw&0xFFFF);
};
// Bitwise rotate left a 32-bit integer by 1 bit
rol32 = function(n)
{
return (n>>>31)|(n<<1);
};
var len = blen*8;
// Append padding so length in bits is 448 mod 512
x[len>>5] |= 0x80 << (24-len%32);
// Append length
x[((len+64>>9)<<4)+15] = len;
var w = Array(80);
var k1 = 0x5A827999;
var k2 = 0x6ED9EBA1;
var k3 = 0x8F1BBCDC;
var k4 = 0xCA62C1D6;
var h0 = 0x67452301;
var h1 = 0xEFCDAB89;
var h2 = 0x98BADCFE;
var h3 = 0x10325476;
var h4 = 0xC3D2E1F0;
for(var i=0;i<x.length;i+=16) {
var j,t;
var a = h0;
var b = h1;
var c = h2;
var d = h3;
var e = h4;
for(j = 0;j<16;j++) {
w[j] = x[i+j];
t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=16;j<20;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=20;j<40;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k2);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=40;j<60;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),(b&c)|(d&(b|c)),w[j],k3);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=60;j<80;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k4);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
h0 = add32(h0,a);
h1 = add32(h1,b);
h2 = add32(h2,c);
h3 = add32(h3,d);
h4 = add32(h4,e);
}
return Array(h0,h1,h2,h3,h4);
};
}
//}}}
The format of the ~CRYST1 record is as follows.
1 - 6 Record name "~CRYST1"
7 - 15 Real(9.3) a a (Angstroms).
16 - 24 Real(9.3) b b (Angstroms).
25 - 33 Real(9.3) c c (Angstroms).
34 - 40 Real(7.2) alpha alpha (degrees).
41 - 47 Real(7.2) beta beta (degrees).
48 - 54 Real(7.2) gamma gamma (degrees).
56 - 66 ~LString sGroup Space group.
67 - 70 Integer z Z value. # ignored by ~PyMOL
load
When you use the "load" command to read in a PDB file with symmetry information, matrix information should be output. Verify that this information is produced before attempting to display symmetry related molecules.
The "symexp" command is used to display symmetry related molecules in the crystal lattice about an atom selection. This commands creates a set of new objects with a common prefix. Each object in the series corresponds to one symmetry-related object, which can be treated independently. See "help symexp" or the reference section for usage information.
In order to visualize only symmetry-related atoms within a given distance, you need to break the process down into two steps. First, you use the symexp command to create complete symmetry-related objects. Then you use "hide" commands to restrict what is visible to only those areas which you are interested.
{{{load foo.pdb # load PDB file with CRYST record}}}
{{{symexp sym,foo,(foo),5.0}}}
This last command create symmetry related "foo" objects which pass within 5 angstroms of foo using the prefix "sym"
{{{hide (not (foo expand 5))}}}
With this last one you hide atoms greater than 5 A from foo.
NOTE: The symexp command can potentially create large numbers of objects. You will want to use the "delete" command with a wildcard "*" to remove all objects that share a common prefix.
{{{delete sym* # deletes objects starting with "sym"}}}
To open a crystal structure of a dimer from pdb with the symmetry coordinates easiest would be:
click on the 'A' button, select 'generate' and select 'symmetry mates'. From there you can select within how many Angstroms you want your symm molecules to be displayed. From the symmetry related molecules that get displayed you can select the one that completes the dimer.
Alternately:
{{{symexp sym=pdb,(pdb),4.0}}} # Creates symmetry partners within 4 A of molecule pdb
A crystal system is a category of space groups, which characterize symmetry of structures in three dimensions with translational symmetry in three directions.
Any crystal must belong to one of seven crystal systems, the symmetry of which introduces constraints on the possible values of the unit cell parameters.
The seven crystal systems are:
1- [[triclinic|http://en.wikipedia.org/wiki/Triclinic]]
2- [[monoclinic|http://en.wikipedia.org/wiki/Monoclinic]]
3- [[orthorhombic|http://en.wikipedia.org/wiki/Orthorhombic]]
4- [[tetragonal|http://en.wikipedia.org/wiki/Tetragonal]]
5- [[trigonal/rhombohedral|http://en.wikipedia.org/wiki/Rhombohedral]]
6- [[hexagonal|http://en.wikipedia.org/wiki/Hexagonal_crystal_system]]
7- [[cubic|http://en.wikipedia.org/wiki/Cubic_crystal_system]]
There are 2, 13, 59, 68, 25, 27, and 36 ''space groups'' per crystal system, respectively, together ''230''.
# [[R-factor and R-free]]
# [[Modelling of disordered side-chains]]
# [[Model alternate conformations and occupancies]]
# [[Unusually high solvent content]]
# [[Protein crystals with high solvent contents]]
# [[MR hints]]
# [[Macromolecular refinement concepts]]
# [[Model Bias]]
# [[High-resolution structures refinement]]
# [[Advices about refinement and stereochemical restraints]]
##[[REFMAC]]
##CNS
###[[Prepare initial files]]
###[[Rfree between CNS and refmac]]
###[[Omit maps]]
###[[Simulated annealing vs energy minimization]]
###[[Typical run]]
###[[Convert reflection data files from cns to ccp4-mtz]]
##SHELXL
###[[Anisotropic refinement and common errors]]
###[[Convert mtz file to shelx .hkl keeping same Rfree flags]]
##PHENIX
###Manuals:
####http://www.phenix-online.org/download/documentation/phenix/
####http://www.phenix-online.org/download/documentation/phenix/prerelease/phenix_documentation.html
###[[Define strategies for phenix.refine]]
###[[Change weights]]
###[[How to run phenix.ligandfit in the terminal]]
###[[Create cif file for ligands]]
###[[Automatically start next cycle of refinement with default settings created by phenix in previous cycle]]
###[[OMIT maps]]
#[[Model Rebuilding and Validation/Add Waters discussion]]
# [[R-symm and R-merge]]
# [[Space groups]]
# [[Translational Symmetry]]
# [[Crystal Systems]]
# [[Orthogonal and Fractional coordinate systems]]
# [[Rough Calculation of Maximum Delta-Phi (oscillation angle for data collection)]]
# [[Calculation of Delta-Chi (optimal chi offset for oscillation data collection)]]
# [[Calculation of Vm (Matthew's number or coefficient)]]
# [[Statistics from DENZO]]
# [[MTZ FORMAT: (CCP4: Formats)]]
# [[Converting reflection data files to X-plor format]]
# [[R cullis]]
[img[alternate text|Images/dmso.png]]
Dimethyl sulfoxide (DMSO) is a chemical compound with formula (~CH3)2SO.
Is a solvent that dissolves both polar and nonpolar compounds and is miscible in a wide range of organic solvents as well as water.
[img[alternate text|Images/dithiothreitol.png]]
DTT is the common name for a small-molecule redox reagent known as Cleland's reagent. DTT's formula is ~C4H10O2S2; its oxidized form is a disulfide-bonded 6-membered ring. Its name derives from the four-carbon sugar, threose. DTT is an unusually strong reducing agent, owing to its high conformational propensity to form a six-membered ring with an internal disulfide bond.
For making10 ml of 1M stock solution
Dissolve 1.55 g of DTT in 8 ml of ~H2O and bring the volume up to 10 ml with ddH2O. Aliquot solution into microtubes with 1 ml per tube. Store in -20¡C.
Storage: DTT powder is stored in dessicator at -20¡C
Ordering info: ~GibcoBRL15508-013
{{{create v1, (resi 6 and name ~OD2)}}}
{{{create v2, (resi 29 and name P1)}}}
these commands create objects v1 and v2 from residues 6 and 29 exactly on atoms ~OD2 and P1
{{{distance (v29),(v6)}}} # this command will show distances between the two objects created above as dashed lines
//The * means choice of the task to perform//
{{{refinement.refine { }}}
{{{ strategy = *individual_sites \}}}
{{{ rigid_body \}}}
{{{ *individual_adp \}}}
{{{ group_adp \}}}
{{{ *tls \}}}
{{{ individual_occupancies \}}}
{{{ group_occupancies \}}}
{{{ none}}}
/***
|''Name:''|DeprecatedFunctionsPlugin|
|''Description:''|Support for deprecated functions removed from core|
***/
//{{{
if(!version.extensions.DeprecatedFunctionsPlugin) {
version.extensions.DeprecatedFunctionsPlugin = {installed:true};
//--
//-- Deprecated code
//--
// @Deprecated: Use createElementAndWikify and this.termRegExp instead
config.formatterHelpers.charFormatHelper = function(w)
{
w.subWikify(createTiddlyElement(w.output,this.element),this.terminator);
};
// @Deprecated: Use enclosedTextHelper and this.lookaheadRegExp instead
config.formatterHelpers.monospacedByLineHelper = function(w)
{
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[1];
if(config.browser.isIE)
text = text.replace(/\n/g,"\r");
createTiddlyElement(w.output,"pre",null,null,text);
w.nextMatch = lookaheadRegExp.lastIndex;
}
};
// @Deprecated: Use <br> or <br /> instead of <<br>>
config.macros.br = {};
config.macros.br.handler = function(place)
{
createTiddlyElement(place,"br");
};
// Find an entry in an array. Returns the array index or null
// @Deprecated: Use indexOf instead
Array.prototype.find = function(item)
{
var i = this.indexOf(item);
return i == -1 ? null : i;
};
// Load a tiddler from an HTML DIV. The caller should make sure to later call Tiddler.changed()
// @Deprecated: Use store.getLoader().internalizeTiddler instead
Tiddler.prototype.loadFromDiv = function(divRef,title)
{
return store.getLoader().internalizeTiddler(store,this,title,divRef);
};
// Format the text for storage in an HTML DIV
// @Deprecated Use store.getSaver().externalizeTiddler instead.
Tiddler.prototype.saveToDiv = function()
{
return store.getSaver().externalizeTiddler(store,this);
};
// @Deprecated: Use store.allTiddlersAsHtml() instead
function allTiddlersAsHtml()
{
return store.allTiddlersAsHtml();
}
// @Deprecated: Use refreshPageTemplate instead
function applyPageTemplate(title)
{
refreshPageTemplate(title);
}
// @Deprecated: Use story.displayTiddlers instead
function displayTiddlers(srcElement,titles,template,unused1,unused2,animate,unused3)
{
story.displayTiddlers(srcElement,titles,template,animate);
}
// @Deprecated: Use story.displayTiddler instead
function displayTiddler(srcElement,title,template,unused1,unused2,animate,unused3)
{
story.displayTiddler(srcElement,title,template,animate);
}
// @Deprecated: Use functions on right hand side directly instead
var createTiddlerPopup = Popup.create;
var scrollToTiddlerPopup = Popup.show;
var hideTiddlerPopup = Popup.remove;
// @Deprecated: Use right hand side directly instead
var regexpBackSlashEn = new RegExp("\\\\n","mg");
var regexpBackSlash = new RegExp("\\\\","mg");
var regexpBackSlashEss = new RegExp("\\\\s","mg");
var regexpNewLine = new RegExp("\n","mg");
var regexpCarriageReturn = new RegExp("\r","mg");
}
//}}}
To color maps with red as positive and green as negative:
{{{(set-swap-difference-map-colours 1)}}}
/***
|''Name:''|DropDownMenuPlugin|
|''Description:''|Create dropdown menus from unordered lists|
|''Author:''|Saq Imtiaz ( lewcid@gmail.com )|
|''Source:''|http://tw.lewcid.org/#DropDownMenuPlugin|
|''Code Repository:''|http://tw.lewcid.org/svn/plugins|
|''Version:''|2.1|
|''Date:''|11/04/2007|
|''License:''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''~CoreVersion:''|2.2.5|
!!Usage:
* create a two-level unordered list using wiki syntax, and place {{{<<dropMenu>>}}} on the line after it.
* to create a vertical menu use {{{<<dropMenu vertical>>}}} instead.
* to assign custom classes to the list, just pass them as parameters to the macro {{{<<dropMenu className1 className2 className3>>}}}
!!Features:
*Supports just a single level of drop-downs, as anything more usually provides a poor experience for the user.
* Very light weight, about 1.5kb of JavaScript and 4kb of CSS.
* Comes with two built in css 'themes', the default horizontal and vertical.
!!Customizing:
* to customize the appearance of the menu's, you can either add a custom class as described above or, you can edit the CSS via the StyleSheetDropDownMenu shadow tiddler.
!!Examples:
* [[DropDownMenuDemo]]
***/
// /%
//!BEGIN-PLUGIN-CODE
config.macros.dropMenu={
dropdownchar: "\u25bc",
handler : function(place,macroName,params,wikifier,paramString,tiddler){
list = findRelated(place.lastChild,"UL","tagName","previousSibling");
if (!list)
return;
addClass(list,"suckerfish");
if (params.length){
addClass(list,paramString);
}
this.fixLinks(list);
},
fixLinks : function(el){
var els = el.getElementsByTagName("li");
for(var i = 0; i < els.length; i++) {
if(els[i].getElementsByTagName("ul").length>0){
var link = findRelated(els[i].firstChild,"A","tagName","nextSibling");
if(!link){
var ih = els[i].firstChild.data;
els[i].removeChild(els[i].firstChild);
var d = createTiddlyElement(null,"a",null,null,ih+this.dropdownchar,{href:"javascript:;"});
els[i].insertBefore(d,els[i].firstChild);
}
else{
link.firstChild.data = link.firstChild.data + this.dropdownchar;
removeClass(link,"tiddlyLinkNonExisting");
}
}
els[i].onmouseover = function() {
addClass(this, "sfhover");
};
els[i].onmouseout = function() {
removeClass(this, "sfhover");
};
}
}
};
config.shadowTiddlers["StyleSheetDropDownMenuPlugin"] =
"/*{{{*/\n"+
"/***** LAYOUT STYLES - DO NOT EDIT! *****/\n"+
"ul.suckerfish, ul.suckerfish ul {\n"+
" margin: 0;\n"+
" padding: 0;\n"+
" list-style: none;\n"+
" line-height:1.4em;\n"+
"}\n\n"+
"ul.suckerfish li {\n"+
" display: inline-block; \n"+
" display: block;\n"+
" float: left; \n"+
"}\n\n"+
"ul.suckerfish li ul {\n"+
" position: absolute;\n"+
" left: -999em;\n"+
"}\n\n"+
"ul.suckerfish li:hover ul, ul.suckerfish li.sfhover ul {\n"+
" left: auto;\n"+
"}\n\n"+
"ul.suckerfish ul li {\n"+
" float: none;\n"+
" border-right: 0;\n"+
" border-left:0;\n"+
"}\n\n"+
"ul.suckerfish a, ul.suckerfish a:hover {\n"+
" display: block;\n"+
"}\n\n"+
"ul.suckerfish li a.tiddlyLink, ul.suckerfish li a, #mainMenu ul.suckerfish li a {font-weight:bold;}\n"+
"/**** END LAYOUT STYLES *****/\n"+
"\n\n"+
"/**** COLORS AND APPEARANCE - DEFAULT *****/\n"+
"ul.suckerfish li a {\n"+
" padding: 0.5em 1.5em;\n"+
" color: #FFF;\n"+
" background: #0066aa;\n"+
" border-bottom: 0;\n"+
" font-weight:bold;\n"+
"}\n\n"+
"ul.suckerfish li:hover a, ul.suckerfish li.sfhover a{\n"+
" background: #00558F;\n"+
"}\n\n"+
"ul.suckerfish li:hover ul a, ul.suckerfish li.sfhover ul a{\n"+
" color: #000;\n"+
" background: #eff3fa;\n"+
" border-top:1px solid #FFF;\n"+
"}\n\n"+
"ul.suckerfish ul li a:hover {\n"+
" background: #e0e8f5;\n"+
"}\n\n"+
"ul.suckerfish li a{\n"+
" width:9em;\n"+
"}\n\n"+
"ul.suckerfish ul li a, ul.suckerfish ul li a:hover{\n"+
" display:inline-block;\n"+
" width:9em;\n"+
"}\n\n"+
"ul.suckerfish li {\n"+
" border-left: 1px solid #00558F;\n"+
"}\n"+
"/***** END COLORS AND APPEARANCE - DEFAULT *****/\n"+
"\n\n"+
"/***** LAYOUT AND APPEARANCE: VERTICAL *****/\n"+
"ul.suckerfish.vertical li{\n"+
" width:10em;\n"+
" border-left: 0px solid #00558f;\n"+
"}\n\n"+
"ul.suckerfish.vertical ul li, ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a {\n"+
" border-left: 0.8em solid #00558f;\n"+
"}\n\n"+
"ul.suckerfish.vertical li a, ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a, ul.suckerfish.vertical li.sfhover a:hover{\n"+
" width:8em;\n"+
"}\n\n"+
"ul.suckerfish.vertical {\n"+
" width:10em; text-align:left;\n"+
" float:left;\n"+
"}\n\n"+
"ul.suckerfish.vertical li a {\n"+
" padding: 0.5em 1em 0.5em 1em;\n"+
" border-top:1px solid #fff;\n"+
"}\n\n"+
"ul.suckerfish.vertical, ul.suckerfish.vertical ul {\n"+
" line-height:1.4em;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover ul, ul.suckerfish.vertical li.sfhover ul { \n"+
" margin: -2.4em 0 0 10.9em;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover ul li a, ul.suckerfish.vertical li.sfhover ul li a {\n"+
" border: 0px solid #FFF;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover a, ul.suckerfish.vertical li.sfhover a{\n"+
" padding-right:1.1em;\n"+
"}\n\n"+
"ul.suckerfish.vertical li:hover ul li, ul.suckerfish.vertical li.sfhover ul li {\n"+
" border-bottom:1px solid #fff;\n"+
"}\n\n"+
"/***** END LAYOUT AND APPEARANCE: VERTICAL *****/\n"+
"/*}}}*/";
store.addNotification("StyleSheetDropDownMenuPlugin",refreshStyles);
//!END-PLUGIN-CODE
// %/
[>img[alternate text|Images/edta.png]]
EDTA is the chemical compound ethylenediaminetetraacetic acid. EDTA is a chelating agent, forming coordination compounds with most monovalent, divalent, trivalent and tetravalent metal ions, such as silver (Ag+), calcium (Ca2+), manganese (Mn2+), copper (Cu2+), iron (Fe3+) and zirconium (Zr4+). EDTA contains 4 carboxylic acid and 2 tertiary amine groups that can participate in acid-base reactions. EDTA forms especially strong complexes with Mn, Cu, Fe(III), and Co(III).
Used in scavenging metal ions: in biochemistry and molecular biology, ion depletion is commonly used to inactivate enzymes which could damage DNA or proteins.
/*{{{*/
/*}}}*/
/*{{{*/
a {color:#0044BB;font-weight:bold}
/*}}}*/
/***
|''Name:''|EasyEditPlugin|
|''Description:''|Lite and extensible Wysiwyg editor for TiddlyWiki.|
|''Version:''|1.3.3|
|''Date:''|Dec 21,2007|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0|
!Demo
*On the plugin [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], see [[WysiwygDemo]] and use the {{{write}}} button.
!Installation
#import the plugin,
#save and reload,
#use the <<toolbar easyEdit>> button in the tiddler's toolbar (in default ViewTemplate) or add {{{easyEdit}}} command in your own toolbar.
! Useful Addons
*[[HTMLFormattingPlugin|http://www.tiddlytools.com/#HTMLFormattingPlugin]] to embed wiki syntax in html tiddlers.<<br>>//__Tips__ : When this plugin is installed, you can use anchor syntax to link tiddlers in wysiwyg mode (example : #example). Anchors are converted back and from wiki syntax when editing.//
*[[TaggedTemplateTweak|http://www.TiddlyTools.com/#TaggedTemplateTweak]] to use alternative ViewTemplate/EditTemplate for tiddler's tagged with specific tag values.
!Configuration
|Buttons in the toolbar (empty = all).<<br>>//Example : bold,underline,separator,forecolor//<<br>>The buttons will appear in this order.| <<option txtEasyEditorButtons>>|
|EasyEditor default height | <<option txtEasyEditorHeight>>|
|Stylesheet applied to the edited richtext |[[EasyEditDocStyleSheet]]|
|Template called by the {{{write}}} button |[[EasyEditTemplate]]|
!How to extend EasyEditor
*To add your own buttons, add some code like the following in a systemConfig tagged tiddler (//use the prompt attribute only if there is a parameter//) :
**{{{EditorToolbar.buttons.heading = {label:"H", toolTip : "Set heading level", prompt: "Enter heading level"};}}}
**{{{EditorToolbar.buttonsList +=",heading";}}}
*To get the list of all possible commands, see the documentation of the [[Gecko built-in rich text editor|http://developer.mozilla.org/en/docs/Midas]] or the [[IE command identifiers|http://msdn2.microsoft.com/en-us/library/ms533049.aspx]].
*To go further in customization, see [[Link button|EasyEditPlugin-LinkButton]] as an example.
!Code
***/
//{{{
var geckoEditor={};
var IEeditor={};
config.options.txtEasyEditorHeight = config.options.txtEasyEditorHeight ? config.options.txtEasyEditorHeight : "500px";
config.options.txtEasyEditorButtons = config.options.txtEasyEditorButtons ? config.options.txtEasyEditorButtons : "";
// TW2.1.x compatibility
config.browser.isGecko = config.browser.isGecko ? config.browser.isGecko : (config.userAgent.indexOf("gecko") != -1);
config.macros.annotations = config.macros.annotations ? config.macros.annotations : {handler : function() {}}
// EASYEDITOR MACRO
config.macros.easyEdit = {
handler : function(place,macroName,params,wikifier,paramString,tiddler) {
var field = params[0];
var height = params[1] ? params[1] : config.options.txtEasyEditorHeight;
var editor = field ? new easyEditor(tiddler,field,place,height) : null;
},
gather: function(element){
var iframes = element.getElementsByTagName("iframe");
if (iframes.length!=1) return null
var text = "<html>"+iframes[0].contentWindow.document.body.innerHTML+"</html>";
text = config.browser.isGecko ? geckoEditor.postProcessor(text) : (config.browser.isIE ? IEeditor.postProcessor(text) : text);
return text;
}
}
// EASYEDITOR CLASS
function easyEditor(tiddler,field,place,height) {
this.tiddler = tiddler;
this.field = field;
this.browser = config.browser.isGecko ? geckoEditor : (config.browser.isIE ? IEeditor : null);
this.wrapper = createTiddlyElement(place,"div",null,"easyEditor");
this.wrapper.setAttribute("easyEdit",this.field);
this.iframe = createTiddlyElement(null,"iframe");
this.browser.setupFrame(this.iframe,height,contextualCallback(this,this.onload));
this.wrapper.appendChild(this.iframe);
}
easyEditor.prototype.onload = function(){
this.editor = this.iframe.contentWindow;
this.doc = this.editor.document;
if (!this.browser.isDocReady(this.doc)) return null;
if (!this.tiddler.isReadOnly() && this.doc.designMode.toLowerCase()!="on") {
this.doc.designMode = "on";
if (this.browser.reloadOnDesignMode) return false; // IE fire readystatechange after designMode change
}
var internalCSS = store.getTiddlerText("EasyEditDocStyleSheet");
setStylesheet(internalCSS,"EasyEditDocStyleSheet",this.doc);
this.browser.initContent(this.doc,store.getValue(this.tiddler,this.field));
var barElement=createTiddlyElement(null,"div",null,"easyEditorToolBar");
this.wrapper.insertBefore(barElement,this.wrapper.firstChild);
this.toolbar = new EditorToolbar(this.doc,barElement,this.editor);
this.browser.plugEvents(this.doc,contextualCallback(this,this.scheduleButtonsRefresh));
this.editor.focus();
}
easyEditor.SimplePreProcessoror = function(text) {
var re = /^<html>(.*)<\/html>$/m;
var htmlValue = re.exec(text);
var value = (htmlValue && (htmlValue.length>0)) ? htmlValue[1] : text;
return value;
}
easyEditor.prototype.scheduleButtonsRefresh=function() { //doesn't refresh buttons state when rough typing
if (this.nextUpdate) window.clearTimeout(this.nextUpdate);
this.nextUpdate = window.setTimeout(contextualCallback(this.toolbar,EditorToolbar.onUpdateButton),easyEditor.buttonDelay);
}
easyEditor.buttonDelay = 200;
// TOOLBAR CLASS
function EditorToolbar(target,parent,window){
this.target = target;
this.window=window;
this.elements={};
var row = createTiddlyElement(createTiddlyElement(createTiddlyElement(parent,"table"),"tbody"),"tr");
var buttons = (config.options.txtEasyEditorButtons ? config.options.txtEasyEditorButtons : EditorToolbar.buttonsList).split(",");
for(var cpt = 0; cpt < buttons.length; cpt++){
var b = buttons[cpt];
var button = EditorToolbar.buttons[b];
if (button) {
if (button.separator)
createTiddlyElement(row,"td",null,"separator").innerHTML+=" ";
else {
var cell=createTiddlyElement(row,"td",null,b+"Button");
if (button.onCreate) button.onCreate.call(this, cell, b);
else EditorToolbar.createButton.call(this, cell, b);
}
}
}
}
EditorToolbar.createButton = function(place,name){
this.elements[name] = createTiddlyButton(place,EditorToolbar.buttons[name].label,EditorToolbar.buttons[name].toolTip,contextualCallback(this,EditorToolbar.onCommand(name)),"button");
}
EditorToolbar.onCommand = function(name){
var button = EditorToolbar.buttons[name];
return function(){
var parameter = false;
if (button.prompt) {
var parameter = this.target.queryCommandValue(name);
parameter = prompt(button.prompt,parameter);
}
if (parameter != null) {
this.target.execCommand(name, false, parameter);
EditorToolbar.onUpdateButton.call(this);
}
return false;
}
}
EditorToolbar.getCommandState = function(target,name){
try {return target.queryCommandState(name)}
catch(e){return false}
}
EditorToolbar.onRefreshButton = function (name){
if (EditorToolbar.getCommandState(this.target,name)) addClass(this.elements[name].parentNode,"buttonON");
else removeClass(this.elements[name].parentNode,"buttonON");
this.window.focus();
}
EditorToolbar.onUpdateButton = function(){
for (b in this.elements)
if (EditorToolbar.buttons[b].onRefresh) EditorToolbar.buttons[b].onRefresh.call(this,b);
else EditorToolbar.onRefreshButton.call(this,b);
}
EditorToolbar.buttons = {
separator : {separator : true},
bold : {label:"B", toolTip : "Bold"},
italic : {label:"I", toolTip : "Italic"},
underline : {label:"U", toolTip : "Underline"},
strikethrough : {label:"S", toolTip : "Strikethrough"},
insertunorderedlist : {label:"\u25CF", toolTip : "Unordered list"},
insertorderedlist : {label:"1.", toolTip : "Ordered list"},
justifyleft : {label:"[\u2261", toolTip : "Align left"},
justifyright : {label:"\u2261]", toolTip : "Align right"},
justifycenter : {label:"\u2261", toolTip : "Align center"},
justifyfull : {label:"[\u2261]", toolTip : "Justify"},
removeformat : {label:"\u00F8", toolTip : "Remove format"},
fontsize : {label:"\u00B1", toolTip : "Set font size", prompt: "Enter font size"},
forecolor : {label:"C", toolTip : "Set font color", prompt: "Enter font color"},
fontname : {label:"F", toolTip : "Set font name", prompt: "Enter font name"},
heading : {label:"H", toolTip : "Set heading level", prompt: "Enter heading level (example : h1, h2, ...)"},
indent : {label:"\u2192[", toolTip : "Indent paragraph"},
outdent : {label:"[\u2190", toolTip : "Outdent paragraph"},
inserthorizontalrule : {label:"\u2014", toolTip : "Insert an horizontal rule"},
insertimage : {label:"\u263C", toolTip : "Insert image", prompt: "Enter image url"}
}
EditorToolbar.buttonsList = "bold,italic,underline,strikethrough,separator,increasefontsize,decreasefontsize,fontsize,forecolor,fontname,separator,removeformat,separator,insertparagraph,insertunorderedlist,insertorderedlist,separator,justifyleft,justifyright,justifycenter,justifyfull,indent,outdent,separator,heading,separator,inserthorizontalrule,insertimage";
if (config.browser.isGecko) {
EditorToolbar.buttons.increasefontsize = {onCreate : EditorToolbar.createButton, label:"A", toolTip : "Increase font size"};
EditorToolbar.buttons.decreasefontsize = {onCreate : EditorToolbar.createButton, label:"A", toolTip : "Decrease font size"};
EditorToolbar.buttons.insertparagraph = {label:"P", toolTip : "Format as paragraph"};
}
// GECKO (FIREFOX, ...) BROWSER SPECIFIC METHODS
geckoEditor.setupFrame = function(iframe,height,callback) {
iframe.setAttribute("style","width: 100%; height:" + height);
iframe.addEventListener("load",callback,true);
}
geckoEditor.plugEvents = function(doc,onchange){
doc.addEventListener("keyup", onchange, true);
doc.addEventListener("keydown", onchange, true);
doc.addEventListener("click", onchange, true);
}
geckoEditor.postProcessor = function(text){return text};
geckoEditor.preProcessor = function(text){return easyEditor.SimplePreProcessoror(text)}
geckoEditor.isDocReady = function() {return true;}
geckoEditor.reloadOnDesignMode=false;
geckoEditor.initContent = function(doc,content){
if (content) doc.execCommand("insertHTML",false,geckoEditor.preProcessor(content));
}
// INTERNET EXPLORER BROWSER SPECIFIC METHODS
IEeditor.setupFrame = function(iframe,height,callback) {
iframe.width="99%"; //IE displays the iframe at the bottom if 100%. CSS layout problem ? I don't know. To be studied...
iframe.height=height.toString();
iframe.attachEvent("onreadystatechange",callback);
}
IEeditor.plugEvents = function(doc,onchange){
doc.attachEvent("onkeyup", onchange);
doc.attachEvent("onkeydown", onchange);
doc.attachEvent("onclick", onchange);
}
IEeditor.isDocReady = function(doc){
if (doc.readyState!="complete") return false;
if (!doc.body) return false;
return (doc && doc.getElementsByTagName && doc.getElementsByTagName("head") && doc.getElementsByTagName("head").length>0);
}
IEeditor.postProcessor = function(text){return text};
IEeditor.preProcessor = function(text){return easyEditor.SimplePreProcessoror(text)}
IEeditor.reloadOnDesignMode=true;
IEeditor.initContent = function(doc,content){
if (content) doc.body.innerHTML=IEeditor.preProcessor(content);
}
function contextualCallback(obj,func){
return function(){return func.call(obj)}
}
Story.prototype.previousGatherSaveEasyEdit = Story.prototype.previousGatherSaveEasyEdit ? Story.prototype.previousGatherSaveEasyEdit : Story.prototype.gatherSaveFields; // to avoid looping if this line is called several times
Story.prototype.gatherSaveFields = function(e,fields){
if(e && e.getAttribute) {
var f = e.getAttribute("easyEdit");
if(f){
var newVal = config.macros.easyEdit.gather(e);
if (newVal) fields[f] = newVal;
}
this.previousGatherSaveEasyEdit(e, fields);
}
}
config.commands.easyEdit={
text: "write",
tooltip: "Edit this tiddler in wysiwyg mode",
readOnlyText: "view",
readOnlyTooltip: "View the source of this tiddler",
handler : function(event,src,title) {
clearMessage();
var tiddlerElem = document.getElementById(story.idPrefix + title);
var fields = tiddlerElem.getAttribute("tiddlyFields");
story.displayTiddler(null,title,"EasyEditTemplate",false,null,fields);
return false;
}
}
config.shadowTiddlers.ViewTemplate = config.shadowTiddlers.ViewTemplate.replace(/\+editTiddler/,"+editTiddler easyEdit");
config.shadowTiddlers.EasyEditTemplate = config.shadowTiddlers.EditTemplate.replace(/macro='edit text'/,"macro='easyEdit text'");
config.shadowTiddlers.EasyEditToolBarStyleSheet = "/*{{{*/\n";
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar {font-size:0.8em}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".editor iframe {border:1px solid #DDD}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar td{border:1px solid #888; padding:2px 1px 2px 1px; vertical-align:middle}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar td.separator{border:0}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .button{border:0;color:#444}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .buttonON{background-color:#EEE}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar {margin:0.25em 0}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .boldButton {font-weight:bold}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .italicButton .button {font-style:italic;padding-right:0.65em}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .underlineButton .button {text-decoration:underline}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .strikeButton .button {text-decoration:line-through}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .unorderedListButton {margin-left:0.7em}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .justifyleftButton .button {padding-left:0.1em}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .justifyrightButton .button {padding-right:0.1em}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .justifyfullButton .button, .easyEditorToolBar .indentButton .button, .easyEditorToolBar .outdentButton .button {padding-left:0.1em;padding-right:0.1em}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .increasefontsizeButton .button {padding-left:0.15em;padding-right:0.15em; font-size:1.3em; line-height:0.75em}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .decreasefontsizeButton .button {padding-left:0.4em;padding-right:0.4em; font-size:0.8em;}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .forecolorButton .button {color:red;}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet += ".easyEditorToolBar .fontnameButton .button {font-family:serif}\n" ;
config.shadowTiddlers.EasyEditToolBarStyleSheet +="/*}}}*/";
store.addNotification("EasyEditToolBarStyleSheet", refreshStyles);
config.shadowTiddlers.EasyEditDocStyleSheet = "/*{{{*/\n \n/*}}}*/";
if (config.annotations) config.annotations.EasyEditDocStyleSheet = "This stylesheet is applied when editing a text with the wysiwyg easyEditor";
//}}}
/***
!Link button add-on
***/
//{{{
EditorToolbar.createLinkButton = function(place,name) {
this.elements[name] = createTiddlyButton(place,EditorToolbar.buttons[name].label,EditorToolbar.buttons[name].toolTip,contextualCallback(this,EditorToolbar.onInputLink()),"button");
}
EditorToolbar.onInputLink = function() {
return function(){
var browser = config.browser.isGecko ? geckoEditor : (config.browser.isIE ? IEeditor : null);
var value = browser ? browser.getLink(this.target) : "";
value = prompt(EditorToolbar.buttons["createlink"].prompt,value);
if (value) browser.doLink(this.target,value);
else if (value=="") this.target.execCommand("unlink", false, value);
EditorToolbar.onUpdateButton.call(this);
return false;
}
}
EditorToolbar.buttonsList += ",separator,createlink";
EditorToolbar.buttons.createlink = {onCreate : EditorToolbar.createLinkButton, label:"L", toolTip : "Set link", prompt: "Enter link url"};
geckoEditor.getLink=function(doc){
var range=doc.defaultView.getSelection().getRangeAt(0);
var container = range.commonAncestorContainer;
var node = (container.nodeType==3) ? container.parentNode : range.startContainer.childNodes[range.startOffset];
if (node && node.tagName=="A") {
var r=doc.createRange();
r.selectNode(node);
doc.defaultView.getSelection().addRange(r);
return (node.getAttribute("tiddler") ? "#"+node.getAttribute("tiddler") : node.href);
}
else return (container.nodeType==3 ? "#"+container.textContent.substr(range.startOffset, range.endOffset-range.startOffset).replace(/ $/,"") : "");
}
geckoEditor.doLink=function(doc,link){ // store tiddler in a temporary attribute to avoid url encoding of tiddler's name
var pin = "href"+Math.random().toString().substr(3);
doc.execCommand("createlink", false, pin);
var isTiddler=(link.charAt(0)=="#");
var node = doc.defaultView.getSelection().getRangeAt(0).commonAncestorContainer;
var links= (node.nodeType!=3) ? node.getElementsByTagName("a") : [node.parentNode];
for (var cpt=0;cpt<links.length;cpt++)
if (links[cpt].href==pin){
links[cpt].href=isTiddler ? "javascript:;" : link;
links[cpt].setAttribute("tiddler",isTiddler ? link.substr(1) : "");
}
}
geckoEditor.beforeLinkPostProcessor = geckoEditor.beforelinkPostProcessor ? geckoEditor.beforelinkPostProcessor : geckoEditor.postProcessor;
geckoEditor.postProcessor = function(text){
return geckoEditor.beforeLinkPostProcessor(text).replace(/<a tiddler="([^"]*)" href="javascript:;">(.*?)(?:<\/a>)/gi,"[[$2|$1]]").replace(/<a tiddler="" href="/gi,'<a href="');
}
geckoEditor.beforeLinkPreProcessor = geckoEditor.beforeLinkPreProcessor ? geckoEditor.beforeLinkPreProcessor : geckoEditor.preProcessor
geckoEditor.preProcessor = function(text){
return geckoEditor.beforeLinkPreProcessor(text).replace(/\[\[([^|\]]*)\|([^\]]*)]]/g,'<a tiddler="$2" href="javascript:;">$1</a>');
}
IEeditor.getLink=function(doc){
var node=doc.selection.createRange().parentElement();
if (node.tagName=="A") return node.href;
else return (doc.selection.type=="Text"? "#"+doc.selection.createRange().text.replace(/ $/,"") :"");
}
IEeditor.doLink=function(doc,link){
doc.execCommand("createlink", false, link);
}
IEeditor.beforeLinkPreProcessor = IEeditor.beforeLinkPreProcessor ? IEeditor.beforeLinkPreProcessor : IEeditor.preProcessor
IEeditor.preProcessor = function(text){
return IEeditor.beforeLinkPreProcessor(text).replace(/\[\[([^|\]]*)\|([^\]]*)]]/g,'<a ref="#$2">$1</a>');
}
IEeditor.beforeLinkPostProcessor = IEeditor.beforelinkPostProcessor ? IEeditor.beforelinkPostProcessor : IEeditor.postProcessor;
IEeditor.postProcessor = function(text){
return IEeditor.beforeLinkPostProcessor(text).replace(/<a href="#([^>]*)">([^<]*)<\/a>/gi,"[[$2|$1]]");
}
IEeditor.beforeLinkInitContent = IEeditor.beforeLinkInitContent ? IEeditor.beforeLinkInitContent : IEeditor.initContent;
IEeditor.initContent = function(doc,content){
IEeditor.beforeLinkInitContent(doc,content);
var links=doc.body.getElementsByTagName("A");
for (var cpt=0; cpt<links.length; cpt++) {
links[cpt].href=links[cpt].ref; //to avoid IE conversion of relative URLs to absolute
links[cpt].removeAttribute("ref");
}
}
config.shadowTiddlers.EasyEditToolBarStyleSheet += "\n/*{{{*/\n.easyEditorToolBar .createlinkButton .button {color:blue;text-decoration:underline;}\n/*}}}*/";
config.shadowTiddlers.EasyEditDocStyleSheet += "\n/*{{{*/\na {color:#0044BB;font-weight:bold}\n/*}}}*/";
//}}}
<!--{{{-->
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<!--}}}-->
/***
|Name:|ExtentTagButtonPlugin|
|Description:|Adds a New tiddler button in the tag drop down|
|Version:|3.2 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ExtendTagButtonPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
window.onClickTag_mptw_orig = window.onClickTag;
window.onClickTag = function(e) {
window.onClickTag_mptw_orig.apply(this,arguments);
var tag = this.getAttribute("tag");
var title = this.getAttribute("tiddler");
// Thanks Saq, you're a genius :)
var popup = Popup.stack[Popup.stack.length-1].popup;
createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
wikify("<<newTiddler label:'New tiddler' tag:'"+tag+"'>>",createTiddlyElement(popup,"li"));
return false;
}
//}}}
/***
|Name|FontSizePlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#FontSizePlugin|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Resize tiddler text on the fly. The text size is remembered between sessions by use of a cookie.
You can customize the maximum and minimum allowed sizes.
(only affects tiddler content text, not any other text)
Also, you can load a TW file with a font-size specified in the url.
Eg: http://tw.lewcid.org/#font:110
!Demo:
Try using the font-size buttons in the sidebar, or in the MainMenu above.
!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
Then put {{{<<fontSize "font-size:">>}}} in your SideBarOptions tiddler, or anywhere else that you might like.
!Usage
{{{<<fontSize>>}}} results in <<fontSize>>
{{{<<fontSize font-size: >>}}} results in <<fontSize font-size:>>
!Customizing:
The buttons and prefix text are wrapped in a span with class fontResizer, for easy css styling.
To change the default font-size, and the maximum and minimum font-size allowed, edit the config.fontSize.settings section of the code below.
!Notes:
This plugin assumes that the initial font-size is 100% and then increases or decreases the size by 10%. This stepsize of 10% can also be customized.
!History:
*27-07-06, version 1.0 : prevented double clicks from triggering editing of containing tiddler.
*25-07-06, version 0.9
!Code
***/
//{{{
config.fontSize={};
//configuration settings
config.fontSize.settings =
{
defaultSize : 100, // all sizes in %
maxSize : 200,
minSize : 40,
stepSize : 10
};
//startup code
var fontSettings = config.fontSize.settings;
if (!config.options.txtFontSize)
{config.options.txtFontSize = fontSettings.defaultSize;
saveOptionCookie("txtFontSize");}
setStylesheet(".tiddler .viewer {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
setStylesheet("#contentWrapper .fontResizer .button {display:inline;font-size:105%; font-weight:bold; margin:0 1px; padding: 0 3px; text-align:center !important;}\n .fontResizer {margin:0 0.5em;}","fontResizerButtonStyles");
//macro
config.macros.fontSize={};
config.macros.fontSize.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
var sp = createTiddlyElement(place,"span",null,"fontResizer");
sp.ondblclick=this.onDblClick;
if (params[0])
createTiddlyText(sp,params[0]);
createTiddlyButton(sp,"+","increase font-size",this.incFont);
createTiddlyButton(sp,"=","reset font-size",this.resetFont);
createTiddlyButton(sp,"–","decrease font-size",this.decFont);
}
config.macros.fontSize.onDblClick = function (e)
{
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return false;
}
config.macros.fontSize.setFont = function ()
{
saveOptionCookie("txtFontSize");
setStylesheet(".tiddler .viewer {font-size:"+config.options.txtFontSize+"%;}\n","fontResizerStyles");
}
config.macros.fontSize.incFont=function()
{
if (config.options.txtFontSize < fontSettings.maxSize)
config.options.txtFontSize = (config.options.txtFontSize*1)+fontSettings.stepSize;
config.macros.fontSize.setFont();
}
config.macros.fontSize.decFont=function()
{
if (config.options.txtFontSize > fontSettings.minSize)
config.options.txtFontSize = (config.options.txtFontSize*1) - fontSettings.stepSize;
config.macros.fontSize.setFont();
}
config.macros.fontSize.resetFont=function()
{
config.options.txtFontSize=fontSettings.defaultSize;
config.macros.fontSize.setFont();
}
config.paramifiers.font =
{
onstart: function(v)
{
config.options.txtFontSize = v;
config.macros.fontSize.setFont();
}
};
//}}}
[img[alternate text|Images/alphatable.gif]]
{{{group dists, dist01 dist02}}}
or
{{{group dists, dist0*}}}
Chaotropes, substances that disrupt the structure of water interactions, help to solubilize hydrophobic proteins and peptides.
In addition to increasing solubility of hydrophobic molecules, guanidine is a general protein denaturant, unfolding proteins and altering their three-dimensional structure.Some proteins will be irreversibly altered upon interaction with guanidine solutions.
[>img[alternate text|Images/GuHCl.gif]]
Molecular formula: ~CN3H5•~HCl
Molecular weight: 95.54
~HKL2000 Online Manual: http://www.hkl-xray.com/hkl_web1/hkl/HKL2000manual/index.htm
<<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
/***
|Name:|HideWhenPlugin|
|Description:|Allows conditional inclusion/exclusion in templates|
|Version:|3.1 ($Rev: 3919 $)|
|Date:|$Date: 2008-03-13 02:03:12 +1000 (Thu, 13 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
For use in ViewTemplate and EditTemplate. Example usage:
{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}
{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}
***/
//{{{
window.hideWhenLastTest = false;
window.removeElementWhen = function(test,place) {
window.hideWhenLastTest = test;
if (test) {
removeChildren(place);
place.parentNode.removeChild(place);
}
};
merge(config.macros,{
hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( eval(paramString), place);
}},
showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !eval(paramString), place);
}},
hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAll(params), place);
}},
showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAll(params), place);
}},
hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAny(params), place);
}},
showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAny(params), place);
}},
hideWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAll(params), place);
}},
showWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAll(params), place);
}},
hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place);
}},
showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place);
}},
hideWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.title == params[0], place);
}},
showWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.title != params[0], place);
}},
'else': { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !window.hideWhenLastTest, place);
}}
});
//}}}
With a white background you should also include:
{{{set depth_cue=0}}}
{{{set ray_trace_fog=0}}}
To change the lighting of the object during a ray trace:
{{{set direct=0 (values from 0 to 1)}}}
Other values to play with during ray tracing:
{{{set orthoscopic=0}}}
{{{set antialias=1.0}}}
When doing a final rendering, the following will improve resolution of the image
{{{ray 2400,2400}}}
This will give you an image 2400 by 2400 pixels. This can be used to create smaller images but with a higher resolution. After you have a 2400 by 2400 image you can convert this to a 600 dpi image using an image editor such as photoshop which will give you a 4" by 4" high quality final image.
High-resolution structures refinement
"Typical" protocol found in a famous paper:
- To minimize sequence bias use polyserine model for MR
- Rigid Body by CNS, beyond 4Å
- Simulated annealing by CNS
- Model Rebuilding, only major problematic places
- SHELXL, conjugate gradient least-squares methods against structure factor
- Model Rebuilding, multiple conformations using 1/1.5σ 1mFo-DFc and 3σ mFo-DFc
- Further refinement, anisotropic displacement parameters for protein and active site (SHELXL)
- Anisotropic displacement parameters of a