openmolecules.org

 
Home » DataWarrior » Functionality » Find & Replace or alternative for stereoisomers
Re: Find & Replace or alternative for stereoisomers [message #1718 is a reply to message #1714] Tue, 30 August 2022 21:29 Go to previous messageGo to previous message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
Hi Paul,

this is an unusual request, which you cannot do in DataWarrior directly. However, based on your idea to do text replacements in SMILES, you could run the following macro (copy the macro text below and select 'Macro->Paste Macro' in you open DataWarrior window. The run the macro with 'Macro->Run Macro->Invert Stereo Centers):

<macro name="Invert Stereo Centers">
<task name="addSmilesCodes">
structureColumn=Structure
</task>
<task name="findAndReplace">
isStructure=false
column=Smiles
what=@@
with=##
</task>
<task name="findAndReplace">
isStructure=false
column=Smiles
what=@
with=@@
</task>
<task name="findAndReplace">
isStructure=false
column=Smiles
what=##
with=@
</task>
<task name="addStructuresFromName">
useServer=false
column=Smiles
isSmarts=false
</task>
</macro>
 
Read Message
Read Message
Read Message
Previous Topic: Assign cluster name based on cluster size
Next Topic: Macro for evolutionary library (EL) in Datwarrior (DW)
Goto Forum:
  


Current Time: Fri Nov 22 06:22:37 CET 2024

Total time taken to generate the page: 0.04132 seconds