* a second parameter sets the pdbid as the loaded PyMOL object name
*/
String pdbId = pe.getId();
+ try {
+ String safePDBId = java.net.URLEncoder.encode(pdbId,"UTF-8");
+ pdbId = safePDBId.replace('%', '_');
+ pdbId = pdbId.replace("-", "__");
+ char fc = pdbId.charAt(0);
+ // put an 's' before any numerics
+ if (fc>='0' && fc<='9')
+ {
+ pdbId = 's'+pdbId;
+ }
+// pdbId.replace('-', 0)
+ } catch (Exception x)
+ {
+ Cache.log.error("Unxpected encoding exception for '"+pdbId+"'",x);
+ }
cmd.addParameter(pdbId);
executeCommand(cmd, false);