You need to explicitly close the file handle at the end of the function.  Right now you are relying on Python's garbage collector and the fact that output has gone out of scope.  The file may still be writable after the function returns!  Just use ```output.close()```

More generally, you are making a lot of little calls to the write() method.  Each time that you do this a call to the filesystem is made, which is very expensive.  A much faster way of writing this kind of code is to build up a string (call it 's')  in memory and then do a single, big write command at the end.  Additionally, using the file handler as a context manager, you can ensure that file object is always closed once finished, even in the event of an exception.  This is a lot to take in, so here is a simple example:

```python
s = 'C name: {0}\n'.format(self.attrs['name'])
s += 'C density = {0}\n'.format(self.density)
...
with open(filename, 'a') as f:
    f.write(s)
```

FInally, and perhaps most majorly, I think that there should just be a single write_mcnp() method.  This should take a frac flag which indicates that it should write out in either mass or atom frac form.  'mass' should probably be the default.  Thus the function signature would look like ```def write_mcnp(self, filename, frac='mass')```  Does this make sense?