From: <ha...@us...> - 2011-07-30 17:31:18
|
Revision: 15889 http://jmol.svn.sourceforge.net/jmol/?rev=15889&view=rev Author: hansonr Date: 2011-07-30 17:31:12 +0000 (Sat, 30 Jul 2011) Log Message: ----------- version=12.2.RC2_dev # bug fix: GROMACS reader should not use sorbital group 3 name SOL for water -- changed to WAT # bug fix: SOL considered solvent, but is sorbitol; SOL added to carbohydrate list instead # FEATURE CHANGE: "ligand" definition changed to # !(protein or dna or rna or water or SOL or UREA)" # instead of "hetero and not solvent" Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/more/GromacsReader.java trunk/Jmol/src/org/jmol/modelset/Group.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties trunk/Jmol/src/org/jmol/viewer/JmolConstants.java Modified: trunk/Jmol/src/org/jmol/adapter/readers/more/GromacsReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/more/GromacsReader.java 2011-07-30 16:35:01 UTC (rev 15888) +++ trunk/Jmol/src/org/jmol/adapter/readers/more/GromacsReader.java 2011-07-30 17:31:12 UTC (rev 15889) @@ -74,8 +74,7 @@ } Atom atom = new Atom(); atom.sequenceNumber = parseInt(line, 0, 5); - atom.group3 = parseToken(line, 5, 9).trim(); //allowing for 4 characters - atom.atomName = line.substring(11, 15).trim(); + setAtomName(atom, parseToken(line, 5, 9).trim(), line.substring(11, 15).trim()); atom.atomSerial = parseInt(line, 15, 20); atom.x = parseFloat(line, 20, 28) * 10; atom.y = parseFloat(line, 28, 36) * 10; @@ -101,6 +100,13 @@ } } + private void setAtomName(Atom atom, String gname, String aname) { + atom.atomName = aname; + if (gname.equals("SOL") && aname.length() == 3 && "OW1;HW2;HW3".indexOf(aname) >= 0) + gname="WAT"; + atom.group3 = gname; //allowing for 4 characters + } + String deduceElementSymbol(String group3, String atomName) { // best we can do if (atomName.length() <= 2 && group3.equals(atomName)) Modified: trunk/Jmol/src/org/jmol/modelset/Group.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/Group.java 2011-07-30 16:35:01 UTC (rev 15888) +++ trunk/Jmol/src/org/jmol/modelset/Group.java 2011-07-30 17:31:12 UTC (rev 15889) @@ -214,8 +214,14 @@ return -1; } - public boolean isProtein() { return false; } - public boolean isNucleic() { return false; } + public boolean isProtein() { + return (groupID < JmolConstants.GROUPID_AMINO_MAX); + } + + public boolean isNucleic() { + return (groupID >= JmolConstants.GROUPID_AMINO_MAX + && groupID < JmolConstants.GROUPID_NUCLEIC_MAX); + } public boolean isDna() { return false; } public boolean isRna() { return false; } public boolean isPurine() { return false; } Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-07-30 16:35:01 UTC (rev 15888) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-07-30 17:31:12 UTC (rev 15889) @@ -3,6 +3,11 @@ version=12.2.RC2_dev +# bug fix: GROMACS reader should not use sorbital group 3 name SOL for water -- changed to WAT +# bug fix: SOL considered solvent, but is sorbitol; SOL added to carbohydrate list instead +# FEATURE CHANGE: "ligand" definition changed to +# !(protein or dna or rna or water or SOL or UREA)" +# instead of "hetero and not solvent" # new feature: real-time docking with visual scoring test: # set pdbAddHydrogens # load caffeine.xyz;load append 1crn.pdb @@ -121,7 +126,6 @@ # bug fix: zap of model with measurements causes exception # bug fix: DATA "append @xxx" fails # bug fix: MOL-2D files loaded then saved to PNG do not reload hydrogen atoms -# FEATURE CHANGE (proposed): "ligand" now "!(protein or dna or rna or solvent)" instead of "hetero and not solvent" # new feature: getProperty ligandInfo # -- treatment of ligands as individually covalently bonded units # INDEPENDENTLY of how they are bonded to other atoms such as proteins Modified: trunk/Jmol/src/org/jmol/viewer/JmolConstants.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2011-07-30 16:35:01 UTC (rev 15888) +++ trunk/Jmol/src/org/jmol/viewer/JmolConstants.java 2011-07-30 17:31:12 UTC (rev 15889) @@ -2009,10 +2009,11 @@ public final static int GROUPID_PROLINE = 15; public final static int GROUPID_TRYPTOPHAN = 19; public final static int GROUPID_AMINO_MAX = 24; - + public final static int GROUPID_NUCLEIC_MAX = 42; private final static int GROUPID_WATER = 42; private final static int GROUPID_SOLVENTS = 45; - private final static int GROUPID_SULPHATE = 48; + private final static int GROUPID__TRUE__SOLV_MAX = 46; + private final static int GROUPID_SOLVENT_MAX = 48; public final static String[] predefinedGroup3Names = { // taken from PDB spec @@ -2074,10 +2075,9 @@ "HOH", // 42 water "DOD", // 43 "WAT", // 44 - "SOL", // 45 gromacs solvent - "UREA",// 46 urea - "PO4", // 47 phosphate ions - "SO4", // 48 sulphate ions + "UREA",// 45 urea, a cosolvent + "PO4", // 46 phosphate ions + "SO4", // 47 sulphate ions }; @@ -2402,7 +2402,7 @@ ",[FCA],[FCB],[FRU],[FUC],[FUL],[GAL],[GLA],[GLC]" + ",[GUP],[LXC],[MAN],[RAM],[RIB],[RIP],[XYP],[XYS]" + ",[CBI],[CT3],[CTR],[CTT],[LAT],[MAB],[MAL],[MLR],[MTT]" + - ",[SUC],[TRE],[GCU],[MTL],[NAG],[NDG],[RHA],[SOR]" + + ",[SUC],[TRE],[GCU],[MTL],[NAG],[NDG],[RHA],[SOR],[SOL]" + ",[XYL],[A2G],[LBT],[NGA],[SIA],[SLB]" + ",[AFL],[AGC],[GLB],[NAN],[RAA]"; //these 4 are deprecated in PDB // from Eric Martz; revision by Angel Herraez @@ -2527,8 +2527,8 @@ // "@water _g>=" + GROUPID_WATER + " & _g<" + (GROUPID_SOLVENTS) + ", oxygen & connected(2) & connected(2, hydrogen), (hydrogen) & connected(oxygen & connected(2) & connected(2, hydrogen))", - "@solvent water, (_g>=" + GROUPID_SOLVENTS + " & _g<=" + GROUPID_SULPHATE + ")", // water, other solvent or ions - "@ligand !(protein | dna | rna | solvent)", + "@solvent water, (_g>=" + GROUPID_SOLVENTS + " & _g<" + GROUPID_SOLVENT_MAX + ")", // water, other solvent or ions + "@ligand !(protein | dna | rna | solvent&&_g<" + GROUPID__TRUE__SOLV_MAX + ")", // structure "@turn structure=1", @@ -2593,7 +2593,7 @@ // // ions // - "@ions _g="+(GROUPID_SULPHATE-1)+",_g="+GROUPID_SULPHATE, + "@ions _g>="+(GROUPID__TRUE__SOLV_MAX)+"&_g<"+GROUPID_SOLVENT_MAX, // // structure related This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |