( ( When ( ( a solvent ) ( surrounds ( ( the ( ( cations and ) anions ) ) ( of ( an ( ionic compound ) ) ) ) ) ) ) . )
(ROOT (FRAG (SBAR (WHADVP (WRB When)) (S (NP (DT a) (NN solvent)) (VP (VBZ surrounds) (NP (NP (DT the) (NNS cations) (CC and) (NNS anions)) (PP (IN of) (NP (DT an) (JJ ionic) (NN compound))))))) (. .)))
When a solvent surrounds the cations and anions of an ionic compound.
(ROOT (S (SBAR (WHADVP (WRB When)) (S (VP (VBG naming) (NP (DT an) (JJ ionic) (NN compound))))) (, ,) (NP (DT the) (NN cation)) (VP (VBZ is) (VP (VBN written) (ADVP (RB first)))) (. .)))
When naming an ionic compound, the cation is written first.