remove-water 1¶

Query¶

import mdtraj as md
import numpy as np

def remove_water(traj_file,top_file):
  """
  This function removes solvent from loaded trajectory traj_file and topology in top_file to return the new trajctory
  """
  [insert]
  return new_traj

Output¶

import mdtraj as md
import numpy as np

def remove_water(traj_file,top_file):
  """
  This function removes solvent from loaded trajectory traj_file and topology in top_file to return the new trajctory
  """
  traj = md.load(traj_file,top=top_file)
  top = traj.topology
  new_traj = traj.atom_slice(top.select('not water'))
  return new_traj

Evaluate¶

Go to Google Form